/build/static/layout/Breadcrumb_cap_w.png

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!!


0 Comments   [ + ] Show comments

Answers (1)

Posted by: SMal.tmcc 12 years ago
Red Belt
0

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
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ