DuduMan Posted October 14, 2010 Share Posted October 14, 2010 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 Link to comment Share on other sites More sharing options...
IcemanND Posted October 14, 2010 Share Posted October 14, 2010 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. Link to comment Share on other sites More sharing options...
DuduMan Posted October 14, 2010 Author Share Posted October 14, 2010 (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 October 14, 2010 by DuduMan Link to comment Share on other sites More sharing options...
IcemanND Posted October 14, 2010 Share Posted October 14, 2010 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 Link to comment Share on other sites More sharing options...
DuduMan Posted October 14, 2010 Author Share Posted October 14, 2010 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? Link to comment Share on other sites More sharing options...
IcemanND Posted October 14, 2010 Share Posted October 14, 2010 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. Link to comment Share on other sites More sharing options...
DuduMan Posted October 14, 2010 Author Share Posted October 14, 2010 (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 dissapearsI think somethings missing it the cmd Edited October 14, 2010 by DuduMan Link to comment Share on other sites More sharing options...
IcemanND Posted October 15, 2010 Share Posted October 15, 2010 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. Link to comment Share on other sites More sharing options...
DuduMan Posted October 15, 2010 Author Share Posted October 15, 2010 (edited) 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, 2010 by DuduMan Link to comment Share on other sites More sharing options...
IcemanND Posted October 15, 2010 Share Posted October 15, 2010 open a cmd prompt manually and type the command in after changing to the directory the MSU files are in, what happens then? Link to comment Share on other sites More sharing options...
DuduMan Posted October 15, 2010 Author Share Posted October 15, 2010 (edited) 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, 2010 by DuduMan Link to comment Share on other sites More sharing options...
IcemanND Posted October 15, 2010 Share Posted October 15, 2010 @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. Link to comment Share on other sites More sharing options...
DuduMan Posted October 15, 2010 Author Share Posted October 15, 2010 (edited) 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, 2010 by DuduMan Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now