onebulgar
asked on
Installing locally multiple patches
I would like to write up a fully working script that will install "all" MS 2003 patches within a specified directory (locally) and it should have /quiet /norestart options for all patches. The script should not care the naming convention of the .exe files. It should only care if there are .exe files, it should execute those with /q /n parameters.
The script could be written in vbscript or batch
@echo off
setlocal
set PATHTOFIXES=Drive:\update
%PATHTOFIXES%\*.exe /quiet /norestart
%PATHTOFIXES%\*.exe /quiet /norestart
The script could be written in vbscript or batch
@echo off
setlocal
set PATHTOFIXES=Drive:\update
%PATHTOFIXES%\*.exe /quiet /norestart
%PATHTOFIXES%\*.exe /quiet /norestart
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Nevermind, my mistake. One last related question, what if file is called "patch sf3.exe" instead of patchsf3.exe. Currently, it will not work.
No points to me.
Just quote the executable:
"%%i" /quiet /norestart
Just quote the executable:
"%%i" /quiet /norestart
ASKER
As a matter of fact, I just tried the script and it didn't work. I says, "xyz.exe is not recongized as an internal
Well then, how about this. Note, I replaced Drive with C for this batch file. You'll want to change it as necessary.
@echo off
setlocal
pushd "c:\update"
for /f "tokens=*" %%a in ('dir /b /a-d *.exe 2^>NUL') do "%%a" /quiet /norestart
popd
@echo off
setlocal
pushd "c:\update"
for /f "tokens=*" %%a in ('dir /b /a-d *.exe 2^>NUL') do "%%a" /quiet /norestart
popd
ASKER
SteveGTR: You are right :)
to finish my previous email,...."xyz.exe is not recongized as an internal or external command, operable program or batch file." This happens when I run the script from the cmd. Ah! it is so close to being done!
to finish my previous email,...."xyz.exe is not recongized as an internal or external command, operable program or batch file." This happens when I run the script from the cmd. Ah! it is so close to being done!
ASKER
You are the man Steve!
You got the points but, would it be possible if you can echo what it is doing....?
Thanks
You got the points but, would it be possible if you can echo what it is doing....?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks! SteveGTR and Burns2007
Glad it worked :)
ASKER