Is it possible to update WXP using a batch script? Basically, I would like to run a batch script, which installs all important updates in the background accepting any dialog boxes which need user interaction.


I know I can enable the "Automatically download and install" option to do this, but I have about 100 computers to do, so it would be nice if it can be done via a batch file. That way, I can use the software we already have to run a batch file on all computers with a single click.

  • This does not require a batch script; there is an "Automatically download and install" option in Automatic Update settings (under System Properties). – grawity Feb 22 '11 at 13:56
  • I want to do this on about 100 computers, and non of them have "Automatically download and install" enabled. – oshirowanen Feb 22 '11 at 15:34
  • So your going to have to run and write a batch script every time you want to update the computers? You should look into an update server if you have 100 or more computers to do, that way you can deploy as needed or not at all. You can also send them to test machines to make sure the updates don't break any third party software. It may be more work upfront to enable updates (which you might be able to do with batch scripts) but will save you time down the road... – Not Kyle stop stalking me Feb 22 '11 at 15:50
  • Just once hopefully, after that it can be run many times. Because of the current economy, we're not allowed to spend any money, so no update servers. Any chance you could show me how to write a batch file to enable automatic updates, so all critical updates can be install silently without the users being aware? – oshirowanen Feb 22 '11 at 15:56
  • I have never done it before but I assume such a simple thing is possible. Hopefully someone with experience can show you a working example, anything I write would be similar to what you can find online (since I would probably use google for reference). – Not Kyle stop stalking me Feb 22 '11 at 16:42

You can enable the auto-download and install option through Group Policy. Assuming your PCs aren't logging into a domain (that would make this too simple), just set up the local policy one one machine, export, and import on the others.

Or change the setting through a .reg file - functionally identical to using a .bat - you could pop it into your logon script, if you're using one.

If you have a windows server os installed anywhere, you can set up the wsus role on it (or does it have a new name?) For no additional cost - if it's the repeated downloading that annoys.

You won't find this being handled with a batch file anywhere - probably because it's so simply done in these ways (and would drive one batty to try to maintain).

  • I don't have any training on group policies so I am not allowed to touch it. How would I change the setting through a reg file? Do you have an example reg file which does this? What is this wsus role? Yes we do have some windows server os'es – oshirowanen Feb 23 '11 at 9:40
  • technet.microsoft.com/en-us/wsus/default may help. This should get you started with .reg & GP topics. (though if it's locked down enough that you can't change group policy, importing a registry file will probably be blocked as well.) – Kara Marfia Feb 24 '11 at 0:39
  • @oshirowanen - What a stupid policy. They will let you write a script that could corrupt every single pc image, but won't let you do the correct way, with a group policy. – Ramhound Jul 12 '12 at 19:52

Setup a start up script that runs a registry file to configure automatic updates. Its very easy to configure as you'd like. All the keys are in "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate"

Copy the following to a *.reg file as a good starting point:

Windows Registry Editor Version 5.00


The above will set the computer to auto download all updates and schedule the installation everyday at 3am. It will also install all minor updates silently and let a logged in user decided if the computer reboots. Its a good basic setup and you can further customize it by editing the registry keys - see this TechNet article for more details.


Autopatcher still exists..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.