Link to home
Start Free TrialLog in
Avatar of onebulgar
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

SOLUTION
Avatar of Burns2007
Burns2007

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of onebulgar
onebulgar

ASKER

It creates the file  (pathces.txt) but it says "File Not Found" when I run it from cmd.
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
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
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!

You are the man Steve!

You got the points but, would it be possible if you can echo what it is doing....?

Thanks
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks! SteveGTR and Burns2007
Glad it worked :)