BoardBabe Posted June 24, 2005 Posted June 24, 2005 I create the admin userprofile from a .cmd that runs from cmdlines.txtcmdow @ /HID@echo offset ADMINRIGHTS=SuperDudenet user %ADMINRIGHTS% /addnet localgroup Administratorer %ADMINRIGHTS% /addnet accounts /maxpwage:unlimitedREGEDIT /S Autologon1.regEXITTo ensure that this user is autologgedon the first time, so that WPI will run and install to this user I apply Autologon1.reg that enables autologon in the registry, for this user.Autologon1.regWindows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]"DefaultUserName"="SuperDude""DefaultPassword"="""AutoAdminLogon"="1"How can I apply this regtweak directly from the cmd file without calling an external .reg file? So that I can use the variable for "DefaultUserName"="%ADMINRIGHTS%"I need this Cause I change usernames alot
MHz Posted June 24, 2005 Posted June 24, 2005 (edited) cmdow @ /HID@echo offset ADMINRIGHTS=SuperDudeset KEY="HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"net user %ADMINRIGHTS% /addnet localgroup Administratorer %ADMINRIGHTS% /addnet accounts /maxpwage:unlimitedreg add %KEY% /v DefaultUserName /t REG_SZ /d %ADMINRIGHTS% /freg add %KEY% /v DefaultPassword /t REG_SZ /d "" /freg add %KEY% /v AutoAdminLogon /t REG_SZ /d 1 /fThat should do it. If required, just add "" to where you think a space maybe in a string. Edited June 24, 2005 by MHz
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now