Katch Posted May 25, 2005 Posted May 25, 2005 Hi,Just getting my first unattended install CD together and one thing I haven't worked out how to do yet is make it so my install renames the Administrator and Guest account for me.At the moment I have to use gpedit.msc to apply the changes after the install and I would really like them to be unattended.Any ideas how I do this?
Sonic Posted May 25, 2005 Posted May 25, 2005 I use a vbs file (created by a forum but I don't remember who !)in your $OEM$\cmdlines.txt add this :[Commands]"Wscript Accounts.vbs"and the $OEM$\Accounts.vbs :On Error Resume NextstrComputer = "."Set WshShell = WScript.CreateObject("WScript.Shell")Set WshNetwork = WScript.CreateObject("WScript.Network")Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & "." & "\root\default:StdRegProv")strComputer = WshNetwork.ComputerName'AdministratorSet oMachine = GetObject("WinNT://" & strComputer)Set oInfoUser = GetObject("WinNT://" & strComputer & "/Administrator,user")set oUser = oMachine.MoveHere(oInfoUser.ADsPath,"***YourNewAdminName***")'GuestSet oMachine = GetObject("WinNT://" & strComputer)Set oInfoUser = GetObject("WinNT://" & strComputer & "/Guest,user")set oUser = oMachine.MoveHere(oInfoUser.ADsPath,"***YourNewGuestName***")
Katch Posted May 25, 2005 Author Posted May 25, 2005 Would that work in my start.cmd like this?ECHO.ECHO Renaming User accountsECHO Please wait...start /wait %systemdrive%\Install\accounts.vbs
Sonic Posted May 25, 2005 Posted May 25, 2005 when your start.cmd start ?and it'sstart "" /wait Wscript %systemdrive%\Install\accounts.vbs
tguy Posted May 25, 2005 Posted May 25, 2005 You could also use the resource kit utility, cusrmgr.exe or create a security template, applied with secedit.exe or gpupdate utilities to rename the Administrator and Guest accounts.I have used both and they work equally reliably.Good luck.
Yzöwl Posted May 25, 2005 Posted May 25, 2005 Use renuser.exe from cmdlines.txt or whichever you prefer
Katch Posted May 25, 2005 Author Posted May 25, 2005 This actually worked fine.VB script above,ECHO.ECHO Renaming User accountsECHO Please wait...start /wait %systemdrive%\Install\accounts.vbsWithin my start.cmd script executed on the first logon after the install. [GUIRunOnce] in my winnt.sifI now have every thing working fully unattended apart from initial partitioning (left that attended on purpose.) and more frustratingly the autologon after the main GUI XP install.I still have to enter my password manually to logon and start the OEM installations.[GuiUnattended] AdminPassword=MD5 Hash removed EncryptedAdminPassword=Yes AutoLogon=Yes AutoLogonCount=1 OEMSkipRegional=1 TimeZone=85 OemSkipWelcome=1any ideas why this fails?
Sonic Posted May 25, 2005 Posted May 25, 2005 To autologon you must entry info in registry, and with this method the password appears in clear.Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]"DefaultUserName"="LoginName""DefaultPassword"="RealPassword""AutoAdminLogon"="1"
Yzöwl Posted May 25, 2005 Posted May 25, 2005 any ideas why this fails?It's probably becuase the AutoLogon referred to a username which no longer exists!
Katch Posted May 26, 2005 Author Posted May 26, 2005 any ideas why this fails?It's probably becuase the AutoLogon referred to a username which no longer exists!<{POST_SNAPBACK}>No because this autologon occurs prior to the username rename script. It turns out that autologon only works if the password in stated in the winnt.sif in cleartext, encryption does not work.
Yzöwl Posted May 26, 2005 Posted May 26, 2005 My mistake, I had not noticed that you were running your start.cmd after logon, i.e. at GUIRunOnce. The reason I didn't is because if you don't change the account name for the Administrator, before it logs on, the Profile folder for NewName will still be called Administrator. Making the change at some point up to and including cmdlines.txt would prevent this profile folder name difference.
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