October 14, 201015 yr 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 PleaseThanks in Advance For the helpers
October 14, 201015 yr for /f %i in ('dir /ab *.msu') do wusa.exe "%i" /quietI believe you have to use pkgmgr.exe to install .CAB updates, WUSA only accepts .MSU updates.
October 14, 201015 yr Author 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 October 14, 201015 yr by DuduMan
October 14, 201015 yr 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
October 14, 201015 yr Author I Did that and put in the updates dir ran it and it shows the dos window for a second and disappearsWhy isnt that working?
October 14, 201015 yr Sorry, my bad.for /f %i in ('dir /a /b *.msu') do wusa.exe "%i" /quietIf 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.
October 14, 201015 yr Author 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 dissapearsI think somethings missing it the cmd Edited October 14, 201015 yr by DuduMan
October 15, 201015 yr for /f %i in ('dir /a /b *.msu') do wusa.exe "%i" /quietpauseNow the windw will stay open until you press a key so you can see any errors.
October 15, 201015 yr Author Im sorry but it still the same my friendit shows me this:The syntax of the command is incorrect.C:\>for /f i" /quiet Edited October 15, 201015 yr by DuduMan
October 15, 201015 yr open a cmd prompt manually and type the command in after changing to the directory the MSU files are in, what happens then?
October 15, 201015 yr Author thats what i did before and now i changed dir and its the sameby 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 offfor /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 installedecho Press any key to rebootpause >NULshutdown -r -t 0it works but its not installing very good and its not wusa thats why its not good Edited October 15, 201015 yr by DuduMan
October 15, 201015 yr @echo offfor /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 installedecho Press any key to rebootpause >NULshutdown -r -t 0Try this, changed the start command line.
October 15, 201015 yr Author Thank you very much my friend now it worksSay can you make me a command line for installing CAB files from this command?start /w pkgmgr /ip /m:c:\cabit works but its not showing me what it installs Can you please make me one that does? Edited October 15, 201015 yr by DuduMan
Create an account or sign in to comment