phuqmnb Posted August 25, 2005 Posted August 25, 2005 I am trying to set up all of the post-SP2 updates to run when I execute a batch file located on a external USB HD. I am having problems getting the batch file set up to so it will reconize the drive letter of the external HD. I haven't made that many batch files, so I guess you can call me a n00b. Thanks for the help.
Doc Symbiosis Posted August 26, 2005 Posted August 26, 2005 (edited) In your batch that is located on your external HDD you could use the following line:set usbpath=%~dp0At the end of your batch you should insert the line:set usbpath=or you have to work with setlocal and endlocalThen %USBPATH% is the variable, which contains the path to the directory, the batch lies in, so in this case your external HDD.Hope this helps. Edited August 26, 2005 by Doc Symbiosis
phuqmnb Posted August 26, 2005 Author Posted August 26, 2005 yeah, that helped. I found another way to do it instead of doing it the way I wa thinking. @echo offecho This will install Post-SP2 updates...pauseecho Installing Windows2000-KB899587-x86-ENU..\WindowsUpdates\Windows2000-KB899587-x86-ENU.exe /passive /norestartecho Installing WindowsInstaller-KB893803-v2-x86..\WindowsUpdates\WindowsInstaller-KB893803-v2-x86.exe /passive /norestartecho Installing Windows-KB890830-V1.7A-ENU..\WindowsUpdates\Windows-KB890830-V1.7A-ENU.exe /qecho Installing WindowsXP-KB873333-x86-ENU..\WindowsUpdates\WindowsXP-KB873333-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB873339-x86-ENU..\WindowsUpdates\WindowsXP-KB873339-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB885250-x86-ENU..\WindowsUpdates\WindowsXP-KB885250-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB885835-x86-ENU..\WindowsUpdates\WindowsXP-KB885835-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB885836-x86-ENU..\WindowsUpdates\WindowsXP-KB885836-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB885884-x86-enu..\WindowsUpdates\WindowsXP-KB885884-x86-enu.exe /passive /norestartecho Installing WindowsXP-KB886185-x86-enu..\WindowsUpdates\WindowsXP-KB886185-x86-enu.exe /passive /norestartecho Installing WindowsXP-KB887472-x86-enu..\WindowsUpdates\WindowsXP-KB887472-x86-enu.exe /passive /norestart echo Installing WindowsXP-KB887742-x86-ENU..\WindowsUpdate\WindowsXP-KB887742-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB888113-x86-ENU..\WindowsUpdate\WindowsXP-KB888113-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB888302-x86-ENU..\WindowsUpdates\WindowsXP-KB888302-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB890046-x86-ENU..\WindowsUpdates\WindowsXP-KB890046-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB890859-x86-ENU..\WindowsUpdates\WindowsXP-KB890859-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB891781-x86-ENU..\WindowsUpdates\WindowsXP-KB891781-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB893066-v2-x86-ENU..\WindowsUpdates\WindowsXP-KB893066-v2-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB893086-x86-ENU..\WindowsUpdates\WindowsXP-KB893086-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB893756-x86-ENU..\WindowsUpdates\WindowsXP-KB893756-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB894391-x86-ENU..\WindowsUpdates\WindowsXP-KB894391-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB896344-v2-x86-ENU..\WindowsUpdates\WindowsXP-KB896344-v2-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB896358-x86-ENU..\WindowsUpdates\WindowsXP-KB896358-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB896422-x86-ENU..\WindowsUpdates\WindowsXP-KB896422-x86-ENU.exe /passive /norestarecho Installing WindowsXP-KB896423-x86-ENU..\WindowsUpdates\WindowsXP-KB896423-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB896428-x86-ENU..\WindowsUpdates\WindowsXP-KB896428-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB896727-x86-ENU..\WindowsUpdates\WindowsXP-KB896727-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB898461-x86-ENU..\WindowsUpdates\WindowsXP-KB898461-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB899587-x86-ENU..\WindowsUpdates\WindowsXP-KB899587-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB899588-x86-ENU..\WindowsUpdates\WindowsXP-KB899588-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB899591-x86-ENU..\WindowsUpdates\WindowsXP-KB899591-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB900930-x86-ENU..\WindowsUpdates\WindowsXP-KB900930-x86-ENU.exe /passive /norestartecho Installing WindowsXP-KB901214-x86-ENU..\WindowsUpdates\WindowsXP-KB901214-x86-ENU.exe /passive /norestartecho Installing .Net Framework 1.1..\WindowsUpdates\dotnetfx.exe /Qecho Installing NDP1.1sp1-KB867460-X86..\WindowsUpdates\NDP1.1sp1-KB867460-X86.exe /Qecho Installing NDP1.1sp1-KB886903-X86..\WindowsUpdates\NDP1.1sp1-KB886903-X86.exe /Qecho Installing HMTCDWizard_enu.exe ..\WindowsUpdates\HMTCDWizard_enu.exe /passive /norestartecho Installing Microsoft GDI+ Detection Tool..\WindowsUpdates\gdidettool.exe /Qecho Reboot the machine...pauseIf you have any ideas on how I can do this better...please let me know. Thanks.
Sonic Posted August 26, 2005 Posted August 26, 2005 (edited) You can use the great "for" command ...@echo offecho Installing hotfixes ...cd /d "%~dp0"for %%a in (*.exe) do (Start /wait "" %%a /passive /norestart )echo Reboot the machinepauseYou need to paste it in the new cmd file into the same directory of the hotfixes ...Goodbye. Edited August 26, 2005 by sonic
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now