Using WSUS as a post-install task
How do I set up a post-install task to use our WSUS server? We only have a K2000. Thanks!
1 Comment
[ + ] Show comment
-
thanks,SMal.tmcc, I'll try this! - lnovak 9 years ago
Answers (2)
Answer Summary:
Please log in to answer
Posted by:
SMal.tmcc
9 years ago
Our WSUS is automatic to machines in the domain. We join them as a post task and force a gp update for polices which sets wsus-policy and then after a couple of reboots that do other post tasks with autologin enabled we issue wuauclt /Detectnow and wuauclt /updatenow and they start updating.
Comments:
-
SMal.tmcc. Could you provide more information please, cause we´re having the same problem. At the moment we´re using WSUSoffline. When and how do you disable the autologin and how long does this update proces will take. - aragorn.2003 9 years ago
-
gpupdate can take two boots to take effect one to get orders and the next boot to execute them. A third boot then setups Wsus and its registry keys. Speaking of Wsus keys that could also be your problem. If you are syspreping a machine in the domain as your master you will run into problems of duplicate SusClientIDs. When I sysprep my master I run a batch file that removes files and registry keys and one of the keysets you NEED TO delete to prevent all the machines you image from having the same SusCleintID is "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate]" - SMal.tmcc 9 years ago
-
Where did you find the /fastdownloadnow parameter? Documentation for wuauclt is ridiculously absent from the interwebz. - nheyne 9 years ago
-
oops my bad that is a depreciated command it is now wuauclt /updatenow. See my other ans for info on how I got this info. - SMal.tmcc 9 years ago
-
I set up a post install as a bat with the commands wuauclt /detectnow and wuauclt /updatenow as my last task. I can see that it runs and the updates start to install. However, after this the kcleanup runs as it is the last post install task of any K2000 scripted install. This triggers a reboot, causes the pending windows updates to fail, and upon login the updates are not installing.
Is there a way to trigger this to run after the kcleanup, or to stop the kcleanup from rebooting? I don't see how you have this working. - edwimb 9 years ago -
I use start /wait wuauclt /switch to make the process finish before the task advances. I also use the ksleep.exe provided by the k2000 to cause delays where needed. If you want to run this after kcleanup you can put the bat file in c:\windows\temp, have the machine autologin after kcleanup runs and call the batch file from the run once registry key. as an example this one allows one additional reboot after kcleanup runs and then calls the batch file to kill autologin and freeze the system with deepfreeze.
reg.exe add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /v setrunonce1 /d \"reg.exe add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /v refreeze /d c:\windows\w2d\delayedfreeze.bat\" - SMal.tmcc 9 years ago -
Concerning the start /wait wuauclt /switch command, can you show me exactly what you have set to make that work? That sounds pretty neat.
Just to be clear I am doing a scripted install on the K2000. This is exactly what I was doing before:
Post install task, BAT script:
wuauclt /detectnow
wuauclt /updatenow
Are you saying to just do this?:
Post install task, BAT script:
start /wait wuauclt /detectnow
start /wait wuauclt /updatenow
Could I just put 10 of these in there in a row and make the machine reboot over and over running all of the updates? - edwimb 9 years ago -
I gave this a try and it just skipped right passed it before it was finished:
Post install task, BAT script:
start /wait wuauclt /detectnow
start /wait wuauclt /updatenow - edwimb 9 years ago
Posted by:
SMal.tmcc
9 years ago
Top Answer
using sysinternals stings command https://technet.microsoft.com/en-us/sysinternals/bb897439.aspx dissect the wuauclt.exe for its hidden commands.
strings.exe c:\windows\system32\wuauclt.exe > %temp%\wuauclt_strings.txt && %temp%\wuauclt_strings.txt