Jump to content


BzowK

Preventing Auto Reboot When Installing Updates via Task Sequence

Recommended Posts

Hey Guys / Niall -

 

Been trying to figure something out the past few days. Wanted to post in hopes someone could help.

 

For various reasons, I'm needing to create a task sequence which will install all software updates advertised as "Available" to the system the task sequence is advertised to, then not automatically restart once complete. So far, I've been unsuccessful. Below is what I've tried so far:

 

The Native SCCM Way

Created a task sequence with 1 step - "Install Software Updates." The updates install ju9st fine, but depending on which install, the system automatically restarts even though a "Restart System" step was not included. I've found this is due to certain flags in the OS being set to restart.

 

Taskkill Steps After Install Updates Step

I started update installation on a test server, then when done it shows a 15 second (i think) window before it restarts. I tried manually running the following commands to cancel the auto restart:

  • taskkill /F /IM TSManager.exe
  • taskkill /F /IM TrustedInstaller.exe
  • taskkill /F /IM SCClient.exe

None of them worked and honestly didn't have time to see the return codes since it restarted soon after running them.

 

Using Task Sequence with WSF Scripts and Wrapper

This combines two methods. First, I found this post which supposedly lets you run commands in a script which long story - short lets the system ignore restart flags. Now I just needed to find a way to start the updates installation via a command. I found this post which shows how to start update installation using native MDT scripts - mainly ZTIWindowsUpdate.wsf. I then did the following steps:

  1. Created a .vbs script using the script from post mentioned above. For the command part, I substituted "notepad.exe" in example for "cscript ZTIWindowsUpdate.wsf" and saved the file
  2. Created a package with the file created in above step, ZTIWindowsUpdate.wsf, and ZTIUtility.wsf which is a dependency of ZTIWindowsUpdate.wsf
  3. Created a task sequence which had 2 steps as listed in the 2nd post mentioned above. The first was "Set WSUS Server" which I set to our SCCM Primary with correct WSUS port (8530). The second step was to run the command "cscript.exe InstallUpdates.vbs" and point to the package containing the 3 files created in step 2 above.

I advertised a SUG to a collection with test VM as "Available", then advertised the task sequence created above as "Required" at a specific time. When the time came, the task sequence ran, but didn't work. It set the WSUS Server (just sets a TS variable) then ran the script. At this point, the TS froze with the message "Processing 0 Updates" on the screen

post-9090-0-70296500-1389807604_thumb.png

 

Currently, I'm testing a few more things with the script; but after that don't know what to try next.

 

Does anyone have any ideas?

 

Thanks! :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.