Jump to content

Windows 7 Msu Update Scripts Please!


Recommended Posts

Posted

Hi can anyone give me scripts or to make scripts for installing windows 7 updates?

I need 1 for MSU and 1 for CAB and i need it to be a WUSA Scripts Please

Thanks in Advance For the helpers


Posted

for /f %i in ('dir /ab *.msu') do wusa.exe "%i" /quiet

I believe you have to use pkgmgr.exe to install .CAB updates, WUSA only accepts .MSU updates.

Posted (edited)

Thanks my friend and how do i make the script? i mean i know how but do i only need to insert the command line you gave me save it as vbs or cmd or bat file and it works? or what?

and can you give me a CAB Installer using pkgmgr.exe

Edited by DuduMan
Posted

Sorry, forgot to add that. Save as CMD file in the directory with the patches. If you need to put it somewhere else adjust the dir cmd inside the single quotes. You can run the dir cmd by itself and see the order that they will install in and that they are found. I haven't needed to use pkgmgr but you should be able to do something similar. You can check technet for the switches associated with pkgmgr. Package manager command line options

Posted

I Did that and put in the updates dir ran it and it shows the dos window for a second and disappears

Why isnt that working?

Posted

Sorry, my bad.


for /f %i in ('dir /a /b *.msu') do wusa.exe "%i" /quiet

If you run just the dir /a /b *.msu you should see a listing of the files, if run from another directory it should include the path in the name, but no other details will be with the file like time stamp etc.

Posted (edited)

none of of what you said works i tried putting the command line in a cmd file copied it to the updates dir and it still shows the dos window and dissapears

I think somethings missing it the cmd

Edited by DuduMan
Posted


for /f %i in ('dir /a /b *.msu') do wusa.exe "%i" /quiet
pause

Now the windw will stay open until you press a key so you can see any errors.

Posted (edited)

Im sorry but it still the same my friend

it shows me this:

The syntax of the command is incorrect.

C:\>for /f i" /quiet

Edited by DuduMan
Posted (edited)

thats what i did before and now i changed dir and its the same

by the way my friend i changed this ('dir /a /b *.msu') to this (dir /a /b *.msu) and removed the other commands and it listed the updates like you said but the installment dont work cause somethings wrong in this command line can you fix it my friend?

I have this

@echo off

for /f "skip=1" %%A in ('dir /b *.msu') do (
echo Installing Update "%%A" ...
start /wait %%A /quiet /norestart > nul
)

echo.
echo ###########################################################
echo.
echo Updates are installed
echo Press any key to reboot
pause >NUL
shutdown -r -t 0

it works but its not installing very good and its not wusa thats why its not good

Edited by DuduMan
Posted

@echo off

for /f "skip=1" %%A in ('dir /b *.msu') do (
echo Installing Update "%%A" ...
start "" /wait WUSA %%A /quiet /norestart > nul
)

echo.
echo ###########################################################
echo.
echo Updates are installed
echo Press any key to reboot
pause >NUL
shutdown -r -t 0

Try this, changed the start command line.

Posted (edited)

Thank you very much my friend now it works

Say can you make me a command line for installing CAB files from this command?

start /w pkgmgr /ip /m:c:\cab

it works but its not showing me what it installs Can you please make me one that does?

Edited by DuduMan

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...