How to suppress a required reboot of Windows Update when deploying OS and softwares using MDT ?
-
Friday, March 01, 2013 4:38 PM
In the process of installing software, it may take a lot of time if there are many software to be deployed by MDT.
So , in this case, the Windows itself may automatically get and install updates from Windows Update site via internet, a popup coming out to show a time count down of automatic restart of Windows Update. I must click on "No" to prevent reboot.
If this is an unattended senario, the automatic reboot of Windows Update may interrupt the normal deployment.
How to just only suppress the reboot , if possible, do not disable Windows Update.
All Replies
-
Friday, March 01, 2013 8:11 PM
You could have a task step that does
net stop wuauserv
before your application installation.Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ” How to ask a question that is fixable.
-
Friday, March 01, 2013 8:18 PM
There are a few things you can do, disable the windows update steps in the task sequence if you have not done so already. (I belive they are off per default)
There are a few things that still can interfere with this. GPO's pointing to a WSUS server when the client rejoins the domain, SCCM client if you install that early in the process and is set to handle windows update. As imperfect1 suggests you can always do a net stop wuauserv, and turn it back on again as one of the final steps in the TS. You can open the unattended.xml file connected to your Tasksequance and turn it of there aswall (aslong as you either turn it back on in the end or have a GPO in place that turns it back on for use with WSUS)
-
Friday, March 01, 2013 11:18 PM
Long Bo,
Why wouldn't you want updates that require an restart to be installed? If you want to prevent updates during your deployment process, then supply an regularly updated reference image which has the latest Windows updates present.
During the creation of your reference image you may want to fully update your installation with all available updates, so that you can leave it disabled during the deployment phase if you insist on this.
Besides, for application and hotfix installations there are commandline switches which can prevent an possible restart, like "/norestart"
If this post is helpful please click "Mark for answer", thanks! Kind regards
-
Saturday, March 02, 2013 8:48 AM
There are a few things you can do, disable the windows update steps in the task sequence if you have not done so already. (I belive they are off per default)
There are a few things that still can interfere with this. GPO's pointing to a WSUS server when the client rejoins the domain, SCCM client if you install that early in the process and is set to handle windows update. As imperfect1 suggests you can always do a net stop wuauserv, and turn it back on again as one of the final steps in the TS. You can open the unattended.xml file connected to your Tasksequance and turn it of there aswall (aslong as you either turn it back on in the end or have a GPO in place that turns it back on for use with WSUS)
Doing a net stop wuauserv seems not to be a good chioce, because I found that adding a step using command line "net stop wuauserv" in the TS to do this offten leads to OSD issues. It often tells that the command line not correctly run.
So, I want to know if there is any mistake ? And I also want to know how to do this job (disable and then enable WU)in unattended.xml, given that I have open the relatived unattended.xml using Windows System Image Manager.
ThankS a lot!
- Edited by Long Bo Saturday, March 02, 2013 8:49 AM
-
Monday, March 04, 2013 1:29 PM
1. Add ApplyGPOPack=NO to customsettings.ini
2. Run this command to disable Windows Update before Install Applications Step.
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 1 /f
Then, run this command to bring Windows Update back at the end of the task sequence.
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 0 /f
3. You mentioned that all clients retrieve update content directly from the internet. Just my opinion, Build your in-house WSUS infrastructure to handle when/how/what your clients get from Microsoft Update.
- Proposed As Answer by Ty Glander Thursday, March 21, 2013 3:09 PM
-
Monday, March 04, 2013 3:09 PM
sounds kinda weird it would do that I thought the basic behavior is that automatic updating is disabled while a deployment is in progress.
i agree with Rens his suggestion it is the smartest thing to do in the end it saves a lot of deployment time as well.
-
Monday, March 04, 2013 3:17 PM
To prevent the reboots during windows update, use this registry fix:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU
"REG_Z” NoAutoRebootWithLoggedOnUsers
Value 1Technet article here.
/Andrew
Blog: http://scriptimus.wordpress.com
- Proposed As Answer by Ty Glander Thursday, March 21, 2013 3:09 PM
-
Tuesday, March 05, 2013 4:47 AM
Thank you Betty Wong!
I have tested your suggested command line on my PC (Windows 7 Pro).
But after I ran "reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 1 /f" under administrator privilege, I saw that in the Service conslole, the Windows Update service still was running.
I then reboot my PC , and then I saw that in the Service conslole, the Windows Update service still was running too.
-
Tuesday, March 05, 2013 4:52 AM
Thank you Andrew!
Can you show me the complete command line for my poor understanding of Registry operation.
- Edited by Long Bo Tuesday, March 05, 2013 4:53 AM
-
Tuesday, March 05, 2013 9:19 AM
Long Bo, the registry crack I provided does not disable the Windows Update service. It prevents Windows Update from updating in the background. Please check here to verify if it works.
Control Panel\All Control Panel Items\Windows Update\Change settings
-
Tuesday, March 05, 2013 12:45 PM
First: I check "Control Panel\All Control Panel Items\Windows Update\Change settings " ,it showed " Install update automatically (recommended)" ;
Then: I ran "reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update"/v AUOptions /t REG_DWORD/d 1 /f", it showed " Never check for updates ( Not recommended )"
At last: I ran "reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 0 /f", but it didn't show as expected back to "Install update automatically (recommended)", it just showed "Please select an item"
EDIT: I use "reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update"/v AUOptions/t REG_DWORD /d 4 /f" to turn it back to "Install update automatically (recommended)".
- Edited by Long Bo Tuesday, March 05, 2013 12:58 PM
-
Tuesday, March 05, 2013 9:48 PM
Bo. . . Bo. . . Bo. . .
Here you go
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v NoAutoRebootWithLoggedOnUsers /t reg_sz /d 1
Try this and test your build.
/Andrew
Blog: http://scriptimus.wordpress.com
- Proposed As Answer by Ty Glander Thursday, March 21, 2013 3:09 PM
-
Wednesday, March 06, 2013 1:16 AM
Nice!
Should I turn the registry key value back to 0 at the end of TS? And should I and a "restart computer" step following this command line to make the registry take effect?
- Edited by Long Bo Wednesday, March 06, 2013 1:16 AM
-
Wednesday, March 06, 2013 7:24 PM
remove the key after you're finished. restart if you want.Blog: http://scriptimus.wordpress.com
- Proposed As Answer by Ty Glander Thursday, March 21, 2013 3:09 PM

