Disable or Enable Windows Automatic updates from command line

by admin on November 4, 2009

We can disable Windows automatic updates from command line using the below command.

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 1 /f  

I have tested this on Windows XP, Windows server 2003 and Windows 7 and it works perfectly. After running the above command you can also see a balloon popping up near the system tray with the message “Your computer might be at risk… Automatic updates is turned off……“.

Please note that this will not work if domain group policy is enforced and users are prohibited to change the settings. One can find out if a GP is enforced or not looking at the ‘Automatic updates’ tab in Computer properties(sysdm.cpl). If the options are gryed out, it means that domain GP is enforced.

To enable automatic updates we need to set the registry value to 0. Command is given below.

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 0 /f

If you want to download updates but not install till the user acts on it then you can set the registy value to 3.

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 3 /f

If you want to disable Automatic updates service then run the below command.

sc config wuauserv start= disabled

IF you want to stop Automatic updates service then run the below command.

net stop wuauserv

Command for starting automatic updates service:

net start wuauserv

Command for enabling the service:

sc config wuauserv start= auto

Errors:

In Vista/Windows 7, the above commands should be run from elevated administrator command prompt. Otherwise you would get the following error.
c:\>reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 1 /f
ERROR: Access is denied.

Related Posts:
Enabling/disabling automatic updates in Windows: Q & A

{ 12 comments… read them below or add one }

Salim November 13, 2009 at 2:23 pm

Thanks for the tip.. I tried this on Windows 7 and it worked perfectly. Thanks again.

Reply

Anonymous November 28, 2009 at 11:28 am

thanks mate. one question, does this command only disable? or does it enable and disable?

Reply

Techblogger January 12, 2010 at 6:41 am

It can be used to enable also. The command would vary slightly.. just replace 1 with 0. Please see the command below after making this change..

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 0 /f

Reply

Anonymous July 23, 2010 at 1:56 am

Thanks i tested that with Vista it worked for that too .
In my windows update page was having error i did nt have any way other than to disable or enable automatic updates through command prompt.

Best Regards

Kanwal

Reply

Anonymous November 9, 2010 at 12:06 pm

and 3 means Download udates but do not install

Reply

Anonymous February 8, 2011 at 3:42 pm

Thank you so much!! Saved me from infinite looping on Vista Ultimate with automatic updates.

Reply

Techblogger February 9, 2011 at 3:48 pm

Glad that the tip helped you..keep visiting the blog for many more tips..thank you..

Reply

Anonymous June 23, 2011 at 11:52 am

How to check if windows automatic update is on?

Reply

James September 23, 2011 at 11:04 am

Get the registry value using ‘reg query’ command. you can know the updates on/off status based on the registry value

James September 17, 2011 at 8:37 am

Thank you for pointing out the relevant registry keys and how to modify them, the information was most helpful.

Reply

Chioko Charles April 2, 2012 at 7:29 am

The Access Denied message comes if you don’t run command using Administrator privileges, the command works perfectly..you can as well use the GUI..it works perfectly

Reply

RVD October 9, 2012 at 12:00 pm

It works very perfectly.

Reply

Leave a Comment

HTML tags are not allowed.

Previous post:

Next post: