Avatar of Sriram K
Sriram K
Flag for India asked on

Batch file fo rpatch installation

Hi,

we will be installing patches manually on  windows server system due oto some issues with patcihng tool.

We are making a repository of applicaable windows pathces by dowloading them from internet(ms cataloger website) .

Can you please help with a batch file how to automate the installation.

Also, we find making a repository of   individual download from MS catalogue website time consuming and is there any   better or smart method to do this

Thanks.
Windows OSWindows 10AzureWindows Server 2012Windows Server 2016

Avatar of undefined
Last Comment
Michael B. Smith

8/22/2022 - Mon
Michael B. Smith

Window Software Update Services (WSUS). Windows Update For Business (WU4B). Windows Update. Microsoft Update. All of these are "free".

You don't describe the problem you are having, so I don't know why you wouldn't use one of the built-in solutions.

But once you've downloaded the patches, how you install them depends on the file extension. Just create a batch file that lists all the patches.

For exes:

start /wait file.exe /s

For MSUs and MSPs

start /wait  wusa file.msu /quiet /norestart

For MSIs

start /wait  msiexec file,msi /qn

And finish up with a reboot

shutdown -r -f -t 0

Push the batch file with GPO, psexec, Invoke-Command, or whatever tool you have available.
Sriram K

ASKER
Thanks may i Know what start /wait and /quiet  does  ,, while i understand /norestart please

ASKER CERTIFIED SOLUTION
Michael B. Smith

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Sriram K

ASKER
Thanks i understand now  how to create a batch file,  instead of writing all the .msuname ,
is there a way to call them  to the batch file.

I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Michael B. Smith

Assuming traditional batch

for /f "usebackq" %%i in (`dir *.msu /b`) do @start /wait wusa %%i /quiet /norestart

Open in new window