Is there a script that will reinstall a service pack and hotfixes then reboot?

A. Windows NT suffers the problem of whenever you add/modify a core component you have to reinstall the last service pack and any hotfixes and this can be quite a job. This will not be a problem in Windows 2000 as the system will automatically use the newest files from the base install or service pack when adding components.

I knocked a script together below which just applies the service pack and any hotfixes then lets the server/workstation reboot. Ideally store the expanded service pack and hotfixes on a network location and then you/users can run the script to reinstall the service pack/hotfixes.

\\morpheus\installation\nt4ws\sp6a\update\update -u -n -o -z -q<br>
\\morpheus\installation\nt4ws\sp6a\c2-fix\hotfix -n -z -q -m<br>
\\morpheus\installation\nt4ws\sp6a\winlogon-fix\hotfix -n -f -q -m

Basically I've got a share called installation on a server Morpheus. Under that I've expanded Service Pack 6a and the two recent hotfixes.

The first command installs service pack 6, the -u means unattended mode, -n means not to backup files for uninstall purposes, -o means overwrite OEM files without asking, -z says not to reboot after installing (as we need to install the hotfixes) and -q means quiet mode.

Next we install the first hotfix, here we use -n means not to create an uninstall directory, -z means no reboot, -q means quiet and -m for unattended.

The above would be repeated for all hotfixes except the last one applied as after the last one we want to reboot so the -z changes to a -f which forces the applications to close at shutdown and allows the reboot.

You may want to modify bits of this, maybe add some logic to check the users current service pack version (you could use cmdinfo to check this, and then run different service pack/hotfix's depending on that.

I don't create uninstalls for any of the installations as this is a re-installation so this would all ready have been done on the initial installation. If you want to use this script to perform an initial installation consider removing the -n switch from all commands.

TAGS: Security
Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.