Software Deployment Question

Using WSUS as a post-install task

03/23/2015 6272 views
How do I set up a post-install task to use our WSUS server?  We only have a K2000.  Thanks!
Answer Summary:
1 Comment   [ + ] Show comment


  • thanks,SMal.tmcc, I'll try this!

Answer Chosen by the Author

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

Answered 03/24/2015 by: SMal.tmcc
Red Belt

All Answers

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.
Answered 03/23/2015 by: SMal.tmcc
Red Belt

  • 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.
    • 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]"
  • Where did you find the /fastdownloadnow parameter? Documentation for wuauclt is ridiculously absent from the interwebz.
    • 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.
      • 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.
      • 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\"
      • 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?
      • 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
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