How to Install Exe file as Admin with Script in during post installation in K2000
I'm using K2000 to deploy an image, and part of the postinstallation is to execute "Winpe.exe" file, but I found out that Windows 7 needs to run it as admin. So if anybody has a script that allowing me to do this. Thank you so Much!!
Answers (1)
Add autologon to your sysprep for admin and then have the task run as a post task.
<AutoLogon>
<Password>
<Value>*****************</Value>
<PlainText>false</PlainText>
</Password>
<Enabled>true</Enabled>
<LogonCount>1</LogonCount>
<Username>administrator</Username>
</AutoLogon>
or add it to your post task to autologin and run the task or poke to runonce to run it after reboot.
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoAdminLogon /d 1 /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoLogonCount /t REG_DWORD /d 2 /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultUserName /d administrator /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultPassWord /d ***** /f
start /wait winpe
or
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoAdminLogon /d 1 /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoLogonCount /t REG_DWORD /d 1 /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultUserName /d administrator /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultPassWord /d ***** /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v Runwinpe /d winpe.exe
Comments:
-
Isn't ever post install task on the K2 ran as admin already? - dugullett 12 years ago
-
I think in windows 7 unless you set an autologin for someone else it runs as the secondary admin account you created during install. - SMal.tmcc 12 years ago
-
never ran winpe as post, are you repacking the install for VAR/OEM distribution? - SMal.tmcc 12 years ago