Jump to content

Need Help with the Command "Net"


Recommended Posts

Hiii

I want, in my unattended setup, to delete the Xp's 2 Default User named:

Helpassistant

support_388945a0

I find somewhere in here someone saying i can do it from DosShell if i use this Command:

Net User helpassistant /delete

Net User support_388945a0 /delete

That's work in DosShell, but if i create a test.cmd file it's just looping and don't delete the user.

Someone have a better solution deleting this users ?

Best Regard

Edited by Christine_ts
Link to comment
Share on other sites


I run my NET and CACLS during the runonceex portion, that way I dont have to take stabs at where in the install the pieces are created and able to be manipulated.

*you managed to spell helpassistant wrong in both examples, make sure that is not the case in your cmd.*

Link to comment
Share on other sites

I run my NET and CACLS during the runonceex portion, that way I dont have to take stabs at where in the install the pieces are created and able to be manipulated.

*you managed to spell helpassistant wrong in both examples, make sure that is not the case in your cmd.*

Hmmm, yes i see, wrongspelled here, but not in my test, there i just tested using a user called Help.

Can you please tell me how you used Runonce ? Never used it.

Link to comment
Share on other sites

doing a search for use of the runonce, runonceex, and guirunonce will yield massive results.

quick and dirty:

under i386 built an $oem$

in the root of the $oem$ placed the following

File Name: cmdlines.txt

File contents

--------------------------------

[Commands]

".\Install\RunOnce.cmd"

--------------------------------

Then made an "$oem$\install' folder and placed the runonce.cmd and added these lines

-------------------------------------------------------------------------------------------------------------------------------------------------------

SET REGKEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %REGKEY%\012 /VE /D "Playing with Users and Groups" /f -group title strictly cosmetic, nice little arrow next to active set

REG ADD %REGKEY%\012 /V 12 /D "net localgroup auditors /add" /f -creates an auditors group

REG ADD %REGKEY%\012 /V 13 /D "net localgroup auditors admin /add" /f -adds user 'admin' to the auditors group

REG ADD %REGKEY%\012 /V 14 /D "CACLS c:\windows\system32\config /E /T /C /G "auditors":F" /f -grants rights to auditors on the config folder

REG ADD %REGKEY%\012 /V 15 /D "NET USER guest /passwordreq:yes" /f -makes the guest account require a password

REG ADD %REGKEY%\012 /V 16 /D "NET USER IUSR_%computername% /passwordreq:yes" /f -makes the IUSR require a password

---------------------------------------------------------------------------------------------------------------------------------------------------------

If all you are doing is removing users then its probably easier to test on your production box.

build the .cmd first, add the runonce lines, execute, and reboot. You should see it fire off when you log in, I use the runonceex because it makes a pretty dialog that lets the user know something is occuring. Also the /VE helps when you are doing many minutes worth of various loads and the user might believe something has gone awry, also helps with troubleshooting.

Link to comment
Share on other sites

doing a search for use of the runonce, runonceex, and guirunonce will yield massive results.

quick and dirty:

under i386 built an $oem$

in the root of the $oem$ placed the following

File Name: cmdlines.txt

File contents

--------------------------------

[Commands]

".\Install\RunOnce.cmd"

--------------------------------

Then made an "$oem$\install' folder and placed the runonce.cmd and added these lines

-------------------------------------------------------------------------------------------------------------------------------------------------------

SET REGKEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %REGKEY%\012 /VE /D "Playing with Users and Groups" /f -group title strictly cosmetic, nice little arrow next to active set

REG ADD %REGKEY%\012 /V 12 /D "net localgroup auditors /add" /f -creates an auditors group

REG ADD %REGKEY%\012 /V 13 /D "net localgroup auditors admin /add" /f -adds user 'admin' to the auditors group

REG ADD %REGKEY%\012 /V 14 /D "CACLS c:\windows\system32\config /E /T /C /G "auditors":F" /f -grants rights to auditors on the config folder

REG ADD %REGKEY%\012 /V 15 /D "NET USER guest /passwordreq:yes" /f -makes the guest account require a password

REG ADD %REGKEY%\012 /V 16 /D "NET USER IUSR_%computername% /passwordreq:yes" /f -makes the IUSR require a password

---------------------------------------------------------------------------------------------------------------------------------------------------------

If all you are doing is removing users then its probably easier to test on your production box.

build the .cmd first, add the runonce lines, execute, and reboot. You should see it fire off when you log in, I use the runonceex because it makes a pretty dialog that lets the user know something is occuring. Also the /VE helps when you are doing many minutes worth of various loads and the user might believe something has gone awry, also helps with troubleshooting.

Woww, locking complex for a Old Lady easy get confused.

Insted, i use this code:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"Remove Users 1"="\"net\" user HelpAssistant /delete"
"Remove Users 2"="\"net\" user Support_388945a0 /delete"

That's work fine for me.

Thank's anyway, you give me the information i just needed

:thumbup

Edited by Christine_ts
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...