gotenks98 Posted October 3, 2011 Posted October 3, 2011 Ok so I think I kind of got this working now using the following code@echo offsetlocal enableextensions disabledelayedexpansion(set CDROM=)for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (if exist %%i:\sources\install.wim set "CDROM=%%i:")if not defined CDROM goto :eofstart /wait %CDROM%\Updates\IE9-Windows7-x64-enu.exe /passive /norestart /update-nostart /wait wusa.exe %CDROM%\Updates\AMD64-all-ie9-windows6.1-kb2530548-x64.msu /quiet /norestart /nobackupstart /wait wusa.exe %CDROM%\Updates\AMD64-all-ie9-windows6.1-kb2559049-x64.msu /quiet /nobackup /norestartstart /wait wusa.exe %CDROM%\Updates\AMD64-all-windows6.1-kb2533552.msu /quiet /norestart /nobackupstart /wait %CDROM%\Updates\AMD64_X86-all-silverlight.exe /qdel %0What I need now is some way of knowing what its doing right now. Some sort of progress bar. For some of the apps it does like IE9 but not the windows updates. Back with windows xp the /passive command would do this but that does not work with updates for vista going forward unless its a service pack. Any ideas how to create a progress bar of some sort that can go for each app?
cdob Posted October 3, 2011 Posted October 3, 2011 Some sort of progress bar.Poor man approach:echo . start /waitecho ..start /waitecho ...start /waitecho ....start /wait
gotenks98 Posted October 3, 2011 Author Posted October 3, 2011 Tried that I dont see a dos box at all when this thing is going. Not sure what I am doing wrong here.
iamtheky Posted October 3, 2011 Posted October 3, 2011 (edited) probably in something like this format.my items arent so much starting as they are waiting for you to press any key, and then subsequently close the app. but you should get the idea. Maybe echo something more useful and take out the pauses as they only exist because so you can step through it. Not exactly a progress bar proper, but will still inform the user of what is occuring. @echo offcmd /c echo first item starting...pausestart /wait notepad.exeecho first item complete...pauseecho second item starting...pausestart /wait iexplore.exeecho second item complete... Edited October 3, 2011 by iamtheky
gotenks98 Posted October 4, 2011 Author Posted October 4, 2011 probably in something like this format.my items arent so much starting as they are waiting for you to press any key, and then subsequently close the app. but you should get the idea. Maybe echo something more useful and take out the pauses as they only exist because so you can step through it. Not exactly a progress bar proper, but will still inform the user of what is occuring. @echo offcmd /c echo first item starting...pausestart /wait notepad.exeecho first item complete...pauseecho second item starting...pausestart /wait iexplore.exeecho second item complete...So what in the code keeps the dos box open or open a new one? My problem is I dont see the dos box at all when this is going on. Most of my code I got from various websites. I totally suck at programming which is why this is so hard for me.
iamtheky Posted October 4, 2011 Posted October 4, 2011 (edited) the switch on cmd.exe, cmd /c = keeps it open till you are done with it and then closes it automatically. If you are having to troubleshoot maybe cmd /k as that should cause it to persist (though you will end up with many persistent cmd windows if you use cmd /k in multiple places)maybe change your lines to - 'Start /wait cmd /c foo.exe' Edited October 4, 2011 by iamtheky
richard Posted October 10, 2011 Posted October 10, 2011 Ok so I think I kind of got this working now using the following code@echo offsetlocal enableextensions disabledelayedexpansion(set CDROM=)for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (if exist %%i:\sources\install.wim set "CDROM=%%i:")if not defined CDROM goto :eofstart /wait %CDROM%\Updates\IE9-Windows7-x64-enu.exe /passive /norestart /update-nostart /wait wusa.exe %CDROM%\Updates\AMD64-all-ie9-windows6.1-kb2530548-x64.msu /quiet /norestart /nobackupstart /wait wusa.exe %CDROM%\Updates\AMD64-all-ie9-windows6.1-kb2559049-x64.msu /quiet /nobackup /norestartstart /wait wusa.exe %CDROM%\Updates\AMD64-all-windows6.1-kb2533552.msu /quiet /norestart /nobackupstart /wait %CDROM%\Updates\AMD64_X86-all-silverlight.exe /qdel %0What I need now is some way of knowing what its doing right now. Some sort of progress bar. For some of the apps it does like IE9 but not the windows updates. Back with windows xp the /passive command would do this but that does not work with updates for vista going forward unless its a service pack. Any ideas how to create a progress bar of some sort that can go for each app?may i know how you make your setupcomplete.cmd work in install.wim? i put a setupcomplete.cmd in intall,wim, but did not see after system finish installation.
gotenks98 Posted October 10, 2011 Author Posted October 10, 2011 You have to make a folder in your sources directory, it does not go in install.wim. Its sources\$oem$\$$\setup\scripts
gotenks98 Posted October 10, 2011 Author Posted October 10, 2011 the switch on cmd.exe, cmd /c = keeps it open till you are done with it and then closes it automatically. If you are having to troubleshoot maybe cmd /k as that should cause it to persist (though you will end up with many persistent cmd windows if you use cmd /k in multiple places)maybe change your lines to - 'Start /wait cmd /c foo.exe'I got it working for the cmd to stay open but it does not show any text for it. Still trying to figure this part out. I will post back when I get closer to working it out.
simurqq Posted October 20, 2011 Posted October 20, 2011 (edited) the switch on cmd.exe, cmd /c = keeps it open till you are done with it and then closes it automatically. If you are having to troubleshoot maybe cmd /k as that should cause it to persist (though you will end up with many persistent cmd windows if you use cmd /k in multiple places)maybe change your lines to - 'Start /wait cmd /c foo.exe'I got it working for the cmd to stay open but it does not show any text for it. Still trying to figure this part out. I will post back when I get closer to working it out.Hi gotenks98,Any success with displaying text in cmd window? Also, I'm not much comfortable with batch files yet but I use a slightly modified version of your SetupComplete.cmd in the first post as follows:@echo offsetlocal enableextensions disabledelayedexpansion(set CDROM=)for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (if exist %%i:\Autounattend.xml set "CDROM=%%i:")if not defined CDROM goto :eofstart /wait cmd /c wusa.exe %CDROM%\Updates\IE9-win7.msu /quiet /norestart /log:ie9logfile.txtstart /wait cmd /c wusa.exe %CDROM%\Updates\IE9-Windows6.1-KB2586448-x64.msu /quiet /norestart /nobackupstart /wait cmd /c wusa.exe %CDROM%\Updates\IE9-Windows6.1-KB2624899-x64.msu /quiet /norestart /nobackupstart /wait cmd /c wusa.exe %CDROM%\Updates\Windows6.1-KB2533552-x64.msu /quiet /norestart /nobackupstart /wait cmd /c %CDROM%\Updates\Silverlight.exe /qdel %0It works OK (sort of...) and installs KB2533552, Silverlight and IE9 but without cumulative update KB2586448 and hotfix KB2624899. I can see empty CMD windows upon initialization of SetupComplete.cmd but since there is no text/progress bar, it's difficult to judge which app or update is being installed. My update history shows that installation of KB2624899 was cancelled (see: logfile attached). However, "About Internet Explorer" page looks as below. So, here are my guesses:(i) Update KB2586448 is already inserted into IE9 since I use the latest "IE9-win7.msu" and update agent doesn't bother with installing it on top of already-installed package;(ii) Update agent refuses to install hotfix KB2624899 because it's applied on special cases only. However, support article states that:To apply this hotfix, you must have Internet Explorer security update 2586448 installed..Now, I'm really confused!!! Since, as the image shows, I have it installed already...And the last question: Is it possible to somehow suppress WUSA.exe information window during "Setupcomplete" ?!?Thank you!WindowsUpdate.zip Edited October 22, 2011 by simurqq
gotenks98 Posted October 26, 2011 Author Posted October 26, 2011 Still no text when I do this. Its starting to be more trouble than its worth at this point. I dont see why microsoft does not create reliable documentation on how to do this. Its like everytime they come out with a tool or something to help developers they half a** do it by either not putting a gui on it or make it too restrictive to the point where it just does not help at all. I would have loved to be able to use the first login commands for this but I could never get it working after at least 50 attempts on a 64-bit install.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now