MSFN Forum: Need help formatting a cmd in Runonce - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Need help formatting a cmd in Runonce Just not sure of what I'm doing Rate Topic: -----

#1 User is offline   goatfuzz 

  • Newbie
  • Group: Members
  • Posts: 15
  • Joined: 19-August 09
  • OS:XP Pro x86
  • Country: Country Flag

Posted 02 May 2010 - 07:42 PM

Can someone tell me how I reformat the line below for use in RunOnceEx.cmd? I really need to use this but don't understand enough of what I'm doing to reform it for use.

I'm beginning to think that I maybe have to use either cleanup.cmd or menureorg.bat to do this. Is there a preferred "correct" way to do an account delete like this?

---
[ECHO Deleting ASP.NET User Account created by .NET Framework 1.1...
net user aspnet /delete]
---

Hopefully, this will complete my project. I've just been working on this for 6 weeks and really need to finish up.

Thanks for any and all help..

This post has been edited by goatfuzz: 03 May 2010 - 08:40 AM



#2 User is offline   HØLLØW 

  • Member
  • PipPip
  • Group: Members
  • Posts: 135
  • Joined: 01-March 07
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 03 May 2010 - 02:08 PM

Hi there,

the command is correct, so what's the problem?

Getting it in the "RunOnceEx.cmd"?

#3 User is offline   goatfuzz 

  • Newbie
  • Group: Members
  • Posts: 15
  • Joined: 19-August 09
  • OS:XP Pro x86
  • Country: Country Flag

Posted 03 May 2010 - 05:56 PM

View PostHØLLØW, on 03 May 2010 - 02:08 PM, said:

Hi there,

the command is correct, so what's the problem?

Getting it in the "RunOnceEx.cmd"?


Yes, exactly! All the examples of RunOnceEx I've seen don't use echo and such, so I'm unsure of how to put it in the RunOnceEx.cmd. I'm really new to all of this but I understand cleanup.cmd and start.cmd MUCH better than I understand RunOnceEx. SO, do I put it in RunOnceEx the way it is, or do I need to word it a little differently? OR am I better off putting it in my cleanup.cmd file? {I understand how to do that}

Thanks!

#4 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,364
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 04 May 2010 - 12:24 PM

Why delete it when you can just disable it?

RUNONCEEX<snippet>.CMD
REG ADD %KEY%\695 /VE /D "Disabling ASP.NET User Account" /f
REG ADD %KEY%\695 /V 1 /D "net user aspnet /active:no" /f
Where you've obviously already defined %KEY% and not already used '695'.

#5 User is offline   HØLLØW 

  • Member
  • PipPip
  • Group: Members
  • Posts: 135
  • Joined: 01-March 07
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 04 May 2010 - 03:59 PM

View PostYzöwl, on 04 May 2010 - 12:24 PM, said:

Why delete it when you can just disable it?

RUNONCEEX<snippet>.CMD
REG ADD %KEY%\695 /VE /D "Disabling ASP.NET User Account" /f
REG ADD %KEY%\695 /V 1 /D "net user aspnet /active:no" /f
Where you've obviously already defined %KEY% and not already used '695'.



As Yzöwl said, this should work fine for you.

This post has been edited by HØLLØW: 04 May 2010 - 04:00 PM


#6 User is offline   goatfuzz 

  • Newbie
  • Group: Members
  • Posts: 15
  • Joined: 19-August 09
  • OS:XP Pro x86
  • Country: Country Flag

Posted 05 May 2010 - 11:09 AM

Well, actually Yzöwl (and HØLLØW), disabling it never even crossed my mind. That's a great idea! Thanks.
and thanks for the string layout. I've been experimenting with different forms and not getting anywhere. I had decided to just use cleanup.cmd and forget it. But I like this idea much better. Thanks Much !!!

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy