Jump to content
Sign in to follow this  
Digerati

Install Hotfixes Via Batch Files

Recommended Posts

I wanted a simple way for me to install hotfixes with a script.

 

Some allow autoupdates to take care of this task but to me hotfixes are sometimes hotcrashes and if I am the one installed only the hotfixes I want then if they install bad I will know exactly what & why.

 

There is a utility from M$ called SUS that will download all patches and you

can tell it what to install on the clients and when.

 

It likes a lot of space though and the server I wanted to install it on

would not hold it so I had to craft another idea.

 

First idea was a logon script but login scripts run in the USERS context and

sometimes depending on what you put in the script requires certain

permissions.

 

I also only want this to run for a short while so I decided to use GPO and I

will disable the policy later.

 

I made a batch file and used group policy to to add it to computer

configuration / windows settings / startup scripts.

 

This site helped:

http://www.2000trainers.com/article.asp ... 198&page=1

 

[start of file]

@ECHO OFF

VER|FIND "XP">NUL

IF NOT ERRORLEVEL 1 GOTO WinXP

VER|FIND "2000">NUL

IF NOT ERRORLEVEL 1 GOTO Win2K

GOTO BADOS

 

 

:WinXP

ECHO WinXP

GOTO END

 

:Win2K

ECHO Win2K

if exist "c:\winnt\$NtUninstallKB824146$" GOTO END

START notepad \\server\netlogon\info.txt

 

"\\server\apps\Security Patches Win2k\Windows2000-KB824146-x86-ENU.exe"

/u

/q

 

 

:BADOS

ECHO This OS is not supported

GOTO END

 

:END

[end of file]

 

INFO.TXT says:

::::Message::::::::

 

Your computer is installing the latest Microsoft Hotfix and will reboot

when

finished.

Share this post


Link to post
Share on other sites
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...