K2000 Scripted Installation with post installation tasks that enables and renames the default Windows 7 Administrator account, then deletes the setup user??
Can anyone point me to some documentation on this? I do not want to join the domain, just run a standard scripted installation, enable and rename the default administrator account, then on restart, login as the renamed default administrator, and delete the 'setup' user account.
So far I have successfully got to the point where I enable and rename the default administrator account. Now I just need to have the machine log back in as the newly named administrator account and then run a delete 'setup' user account. Is this possible?
1 Comment
[ + ] Show comment
-
Thanks SSMal.tmcc! - kpm8 10 years ago
Answers (1)
Answer Summary:
Please log in to answer
Posted by:
SMal.tmcc
10 years ago
That is easy. let say the other user is 2nduser
post script part1:
net user administrator /active:yes
net user administrator newpassword
wmic useraccount where name='administrator' rename newadminname
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoAdminLogon /d 1 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoLogonCount /t REG_DWORD /d 3 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultUserName /d newadminname /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultPassWord /d newpassword
:::::::check reboot required::::::::
machine will autologin as newadmin name
post script part2:
net user 2nduser /delete.
if you want to delete the profile also use something like:
http://helgeklein.com/free-tools/delprof2-user-profile-deletion-tool/
post script part1:
net user administrator /active:yes
net user administrator newpassword
wmic useraccount where name='administrator' rename newadminname
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoAdminLogon /d 1 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoLogonCount /t REG_DWORD /d 3 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultUserName /d newadminname /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultPassWord /d newpassword
:::::::check reboot required::::::::
machine will autologin as newadmin name
post script part2:
net user 2nduser /delete.
if you want to delete the profile also use something like:
http://helgeklein.com/free-tools/delprof2-user-profile-deletion-tool/