Infinitarchitect
MIS
I have this script that I found online, it works fine on temporarily disabling XP2 on a local machine, how can I modify this script so that it runs on multiple machines?
Check it out:
@echo off
if "%1"=="" goto Usage
if "%1"=="/?" goto Usage
set REGBlockKey=HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate
set REGBlockValue=DoNotAllowXPSP2
set RemoteMachine=%1
if /I "/B" =="%2" goto Block
if /I "/U" =="%2" goto UnBlock
goto Usage
:Block
REG ADD \\%RemoteMachine%\%REGBlockKey% /v %REGBlockValue% /t REG_DWORD /d 1
goto End
:UnBlock
REG DELETE \\%RemoteMachine%\%REGBlockKey% /v %REGBlockValue% /f
goto End
:Usage
Echo.
Echo This tool can be used to remotely block or unblock the delivery of Windows XP SP2 from Windows Update web site or Via Automatic Updates. The ability to block delivery of Windows XP SP2 will only be available for a limited time.
Echo.
Echo Please see for information on the expiration date.
Echo.
Echo Usage:
Echo BlockXPSP2.cmd [^<machine name^>] [/B][/U][/H]
Echo B = Block XP Service Pack 2 deployment
Echo U = Allow XP Service Pack 2 deployment
Echo H = Help
Echo.
Echo Example:
Echo BlockXPSP2.cmd mymachine /B
Echo.
:End
Check it out:
@echo off
if "%1"=="" goto Usage
if "%1"=="/?" goto Usage
set REGBlockKey=HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate
set REGBlockValue=DoNotAllowXPSP2
set RemoteMachine=%1
if /I "/B" =="%2" goto Block
if /I "/U" =="%2" goto UnBlock
goto Usage
:Block
REG ADD \\%RemoteMachine%\%REGBlockKey% /v %REGBlockValue% /t REG_DWORD /d 1
goto End
:UnBlock
REG DELETE \\%RemoteMachine%\%REGBlockKey% /v %REGBlockValue% /f
goto End
:Usage
Echo.
Echo This tool can be used to remotely block or unblock the delivery of Windows XP SP2 from Windows Update web site or Via Automatic Updates. The ability to block delivery of Windows XP SP2 will only be available for a limited time.
Echo.
Echo Please see for information on the expiration date.
Echo.
Echo Usage:
Echo BlockXPSP2.cmd [^<machine name^>] [/B][/U][/H]
Echo B = Block XP Service Pack 2 deployment
Echo U = Allow XP Service Pack 2 deployment
Echo H = Help
Echo.
Echo Example:
Echo BlockXPSP2.cmd mymachine /B
Echo.
:End