Monday, January 7, 2019

Need a batch program to install all manually downloaded Windows Updates in one single click



I got some pre-installed Windows 8 PC. I don't want to automatically download the same updates for all PC again and again which will reduce my internet speed.
So, I have manually downloaded the Window Update (.msu extenstion).



The problem is there are total of 163 updates. I don't have time and energy to click Next > Install > Close for 163 times. I want to install in just one single click using my downloaded .msu update files.




I have tried some third party applications but those doesn't seem to help me.



Appreciate all the help and answers.


Answer



From https://kb.cscc.edu/article/how-to-install-a-msu-update-on-windows-7-from-the-command-line-63.html




To install an .msu update package, run Wusa.exe together with the full
path of the file.




For example, if the Windows6.0-KB934307-x86.msu file is in the
D:\934307 folder, type the following command at a command prompt to
install the update package:



wusa.exe d:\934307\Windows6.0-KB934307-x86.msu



To run Wusa.exe in quiet mode without user interaction, use the /quiet
switch. When the tool runs in quiet mode, it runs without user
interaction. The computer restarts if it is required.




For example, if the Windows6.0-KB934307-x86.msu file is in the
D:\934307 folder, type the following command at a command prompt to
install the update package without user interaction:



wusa.exe d:\934307\Windows6.0-KB934307-x86.msu /quiet



Note: When you use this switch, the Microsoft Software License Terms
do not appear.




To prevent Wusa.exe from restarting the computer, use the /norestart
switch. The /norestart switch is ignored if the /quiet switch is not
present. If you run Wusa.exe together with these two switches, you
must manually restart the operating system after the installation is
complete if the installation requires that you restart the computer.



For example, if the Windows6.0-KB934307-x86.msu file is in the
D:\934307 folder, type the following command at a command prompt to
install the update package:




wusa.exe D:\934307\Windows6.0-KB934307-x86.msu /quiet /norestart




Using this format, you can write a batch file that installs each of the updates in turn.



Something like this run from the folder with the updates should install all of them:



Set Folder="C:\updates"
for %%f in (%Folder%\*.msu) do (
wusa.exe %%f /quiet /norestart

)


Notes:




  • You can check whether the bat file worked or not by trying to manually install the update. Windows Update should reply "Update already installed on this computer".

  • If you see nothing works after running the batch, try deleting /quiet to see the error report.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...