Activating windows 7 through domain and auto login to domain through post installation script
Hi,
I've just deployed windows 7 and created a post installation script to join our domain and change the computer name through relating to the bios serial number. I'm now trying to write a post installation script to auto login into domain user so I can activate windows 7 but having problems. Reason for needing to do this is because our network is running bluereef sonar which blocks the activation of windows 7. We've already tried creating a bypass for the URL's needed for activation but it appears to be a dead end.
I've tried using the following script that I found on the forums, I've changed the variables to what is appropriate for our network and I've rechecked the variables to be correct but keep getting errors.
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 DefaultDomainName /d tmccacad /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultUserName /d installer /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultPassWord /d Password /f
This is the error:
cmd.exe - Application error
"The application was unable to start correctly(0xc0000142). Click OK to close the application."
The computer then restarts and then says "The username or password is incorrect" and it disconnects to the domain.
I've rechecked to see if the login details are correct and they are.
I hope this makes sense. I'm out of ideas now if anyone has any suggestions.
Answers (2)
I posted that info. The error you are getting points to some other problem. (see at bottom) When I sysprep the machine I add a section so the machine autologs on as the local installer account coming out of sysprep.
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>
</OOBE>
<AutoLogon>
<Password>
<Value>VxBxAx4xZxBxAxcxcxAxAxExUxBxAx=</Value>
<PlainText>false</PlainText>
</Password>
<Enabled>true</Enabled>
<LogonCount>1</LogonCount>
<Username>installer</Username>
</AutoLogon>
</component>
then the post commands run and the system comes up in the domain logged in and ready to go. Note it also deletes the local account I auto logged in with during post sysprep
this is my post script:
net start w32time
%SystemRoot%\system32\w32tm /config /update /manualpeerlist:tmccacad.tmcc.edu /syncfromflags:manual
start /wait net user administrator /active:yes
start /wait net localgroup administrators f12master /add
Start /wait net user administrator Password
start /wait cscript.exe -b c:\windows\w2d\join_domain.vbs tmccacad.tmcc.edu installer Password
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 DefaultDomainName /d tmccacad /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultUserName /d installer /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultPassWord /d Password /f
start /wait reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Enviroment" /v LSFORCEHOST /d ms-vdf.tmccacad.tmcc.edu /f
del C:\Users\Default\AppData\Local\Microsoft\Windows\*.log1 /f /q /a:hs
del C:\Users\Default\AppData\Local\Microsoft\Windows\*.log2 /f /q /a:hs
del C:\Users\Default\AppData\Local\Microsoft\Windows\*.blf /f /q /a:hs
del C:\Users\Default\AppData\Local\Microsoft\Windows\*.regtrans-ms /f /q /a:hs
del C:\Users\Default\AppData\Local\Microsoft\Windows\Explorer\*.* /f /q
del c:\users\default\downloads\*.* /f /q /s
"C:\Program Files\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\ospprearm.exe"
start /wait cscript %SystemRoot%\System32\slmgr.vbs -ATO
start /wait cscript "c:\program files\microsoft office\office14\ospp.vbs" /act
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v ipv6kill /d "reg.exe add \"HKLM\SYSTEM\CurrentControlSet\services\Tcpip6\Parameters\" /v DisabledComponents /t REG_DWORD /d 4294967295 /f"
net user installer /delete
cmd /c md "%allusersprofile%\Dell\KACE" & cmd /c move /y "%systemdrive%\KACE\k2000_deployment_info.conf" "%allusersprofile%\Dell\KACE\k2000_deployment_info.conf"
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v kclean /d "c:\kcleanup.exe"
This article indicates, possible some form of program corruption: https://www.compuchenna.co.uk/0xc0000142/