05 April, 2009

Install Software (mostly MS patches) by OS type

You want to install MS patch but there are 2 kind of patches, one for XP and one for Win2k3.
Here is a small script to let you do just this.
It basically query the registry for the OS type search for a string and run a program by the output.

=================================
reg query HKLM\SYSTEM\CurrentControlSet\Control\ProductOptions find "WinNT"
if %errorlevel% == 0 (goto xp) else (goto server)
:xp

\\nt_dn\netlogon\timezonepatch\WindowsXP-KB955839.exe /quiet /norestart
goto end
:server

\\nt_dn\netlogon\timezonepatch\WindowsServer2003-KB955839.exe /quiet /norestart
:end
=================================

Enjoy...

No comments:

Post a Comment