Did you enclose the entire thing in quotes ? It might ignore the
switches if not in quotes.
Simple but had to ask...
> -----Original Message-----
> From: Steve Kelsay [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 12, 2001 11:09 AM
> To: NT System Admin Issues
> Subject: Security Fixes in Batch
>
>
> I have a question about running hotfixes in batches under win
> 2000. I would appreciate any assistance you can give!
>
> When I run the hotfixes from the command line, using the -z ,
> -m, and -q commands, they run unattended with no user interface.
>
> When putting then in a batch file (see below) they seem to
> ignore the parameters. Is there something that is needed in
> addition to what the MS KB article indicates?
>
> The file:
>
> @echo off
> setlocal
>
> if /%1/==/WKS/ goto %1
> if /%1/==/SVR/ goto %1
> if /%1/==/ADV/ goto %1
>
> Echo The passed Parameter must be WKS, SVR, or ADV.
> echo Try Again
> pause
> goto exit
>
> :wks
> echo Updating a WORKSTATION. If not, abort here and now.
> pause
> set PATHTOFIXES="f:\public\steve\security fixes win2k\sp2\wks"
>
> rem QFECHECK.exe install and patch:
> if not exist c:\winnt\system32\qfecheck.exe
> "%PATHTOFIXES%\q282784_w2k_sp3_x86_en.exe -q
>
> rem Apply the current security fixes:
>
> rem Apply Only if no SPs are installed!
> rem echo Applying:Q260219_W2K_SP1_x86_en.EXE -q -z
> rem %PATHTOFIXES%\Q260219_W2K_SP1_x86_en.EXE -q -z
> rem pause
>
> echo Applying:Q252795_W2K_SP3_x86_en.EXE -q -m -z asks for
> input when completed!
> %PATHTOFIXES%\Q252795_W2K_SP3_x86_en.EXE -q -m -z pause
>
> echo Applying:Q298012_W2K_SP3_x86_en.EXE -m -q -z asks for
> OK to reboot %PATHTOFIXES%\Q298012_W2K_SP3_x86_en.EXE -m -q
> -z pause @echo on setlocal
>
> if /%1/==/WKS/ goto %1
> if /%1/==/SVR/ goto %1
> if /%1/==/ADV/ goto %1
>
> Echo The passed Parameter must be WKS, SVR, or ADV.
> echo Try Again
> pause
> goto exit
>
> :wks
> echo Updating a WORKSTATION. If not, abort here and now.
> pause
> set PATHTOFIXES="f:\public\steve\security fixes win2k\sp2\wks"
>
> rem QFECHECK.exe install and patch:
> if not exist c:\winnt\system32\qfecheck.exe
> "%PATHTOFIXES%\q282784_w2k_sp3_x86_en.exe -q
>
> rem Apply the current security fixes:
>
> rem Apply Only if no SPs are installed!
> rem echo Applying:Q260219_W2K_SP1_x86_en.EXE -q -z
> rem %PATHTOFIXES%\Q260219_W2K_SP1_x86_en.EXE -q -z
> rem pause
>
> echo Applying:Q252795_W2K_SP3_x86_en.EXE -q -m -z asks for
> input when completed!
> %PATHTOFIXES%\Q252795_W2K_SP3_x86_en.EXE -q -m -z pause
>
> echo Applying:Q298012_W2K_SP3_x86_en.EXE -m -q -z asks for
> OK to reboot %PATHTOFIXES%\Q298012_W2K_SP3_x86_en.EXE -m -q -z pause
>
> echo Applying:Q302755_W2k_SP3_x86_en.exe -q -z
> %PATHTOFIXES%\Q302755_W2k_SP3_x86_en.exe -q -z pause
>
> echo Applying:Q300972_W2K_SP3_x86_en.EXE -q -z
> %PATHTOFIXES%\Q300972_W2K_SP3_x86_en.EXE -q -z pause
>
> echo Applying:Q299553_W2K_SP3_x86_en.EXE -q -z
> %PATHTOFIXES%\Q299553_W2K_SP3_x86_en.EXE -q -z pause
>
> echo Applying:Q296185_W2K_SP3_x86_en.EXE -q -z
> %PATHTOFIXES%\Q296185_W2K_SP3_x86_en.EXE -q -z pause
>
> echo Applying:rbupdate.exe -q
> %PATHTOFIXES%\rbupdate.exe -q
> pause
>
> echo Applying:Q285156_W2K_SP3_x86_en.EXE -q -z
> %PATHTOFIXES%\Q285156_W2K_SP3_x86_en.EXE -q -z pause
>
> echo Applying:Q285851_W2K_SP3_x86_en.EXE -q -z
> %PATHTOFIXES%\Q285851_W2K_SP3_x86_en.EXE -q -z pause
>
> echo Applying:Q276471_W2K_SP3_x86_en.EXE -q -z
> %PATHTOFIXES%\Q276471_W2K_SP3_x86_en.EXE -q -z echo All
> applied. pause rem All applied, now do the single reboot: rem
> %PATHTOFIXES%\qchain.exe
>
> :SVR
>
>
> Steve Kelsay
> Network Administration Group
> South Carolina Department of Revenue
> 301 Gervais Street
> Columbia, SC 29201
>
> (803) 898-5522
>
>
http://www.sunbelt-software.com/ntsysadmin_list_charter.htm
http://www.sunbelt-software.com/ntsysadmin_list_charter.htm