How to install multiple Windows updates or hotfixes with only one reboot
Note The procedure that is described in this article does not work for product updates that do not use Hotfix.exe or Update.exe as the installation program. For example, Internet Explorer updates for Windows NT 4.0, Windows 2000, and Windows XP use an INF-based installation instead of Update.exe. As a result, you cannot use this procedure to install multiple Microsoft Internet Explorer updates with only one restart on Windows NT 4.0, Windows 2000, or Windows XP. Because Internet Explorer updates for Windows Server 2003 use Update.exe as the installation program, you can use this procedure to install them.
For additional information about these topics, see the following Microsoft Web sites:
Windows XP x64 Edition updates and Windows Server 2003 updates or Windows XP and Windows 2000 updates that were created after December 2002Note To determine when an update was created, view the Modified date on the Update.exe or Hotfix.exe installation program in the update package.
To install a Windows product update on a single computer, run the product update program on the computer that you want to update. To install multiple product updates without restarting the computer between each installation, use the /z switch.
Command-line options for the Update.exe programThe following table identifies the command-line options (or switches) that the Update.exe program supports:
Switch Description------ ----------- /f Forces other programs to close at shutdown. /n Does not back up files for removing hotfixes. /z Does not restart the computer after the installation is completed. /q Uses quiet mode; no user interaction is required. /m Uses unattended Setup mode (Windows 2000). /u Uses unattended Setup mode (Windows XP). /l Lists installed hotfixes.The following code sample is a batch file that installs multiple product updates and makes sure that the correct files are replaced after the computer is restarted.
@echo offsetlocalset PATHTOFIXES=E:\hotfix%PATHTOFIXES%\Q123456_w2k_sp4_x86.exe /Z /M%PATHTOFIXES%\Q123321_w2k_sp4_x86.exe /Z /M%PATHTOFIXES%\Q123789_w2k_sp4_x86.exe /Z /M
All Windows NT 4.0 updates or Windows XP and Windows 2000 updates that were created before December 2002Note To determine when a product update was created, check the Modified date on the Update.exe or Hotfix.exe installation program in the update package.
Microsoft has released a command-line tool that is named QChain.exe. With QChain.exe, system administrators can chain updates together. When you chain updates, you install multiple updates without restarting the computer between each installation. Without this tool, the only supported method is to restart the computer after each update installation. The QChain.exe tool has the following benefits:
- It increases uptime for servers because computers are not being restarted between each update installation.
- It permits faster installations of multiple updates on a single computer.
- It works on both Windows 2000 and Windows NT 4.0.
Chaining update installations without QChain.exe is not safeWhen you install updates, if a file is locked or in use, it cannot be replaced. As a result, the file is placed in the Pending File Rename queue and is replaced after the computer restarts. The problem occurs in the following scenario:
- You install updates A and B without restarting the computer between installations.
- Both packages contain file X. Package A's file X is version 3; package B's file X is version 2. The version of file X on the computer is version 1.
- When package A is installed, it places its version of file X in the Pending File Rename queue.
- When package B is installed, it places its version of file X in the Pending File Rename queue.
- When the computer is restarted, because package B was installed last, its version of file X is installed (in the Pending File Rename queue, the last file is the one that is used). As a result, version 2 is installed instead of version 3 as you expected.
If previously chained updates are installed without restartingAlthough this scenario is rare, it is good practice to verify that your computer has all the fixes that you believe are installed. To verify this, use the Qfecheck.exe tool. For more information about Qfecheck.exe, click the following article number to view the article in the Microsoft Knowledge Base:
To install multiple updates with only one restart
- Run the update installer with the -z switch to instruct the installer not to restart after the installation. Add the -m switch (for Quiet mode) if you do not want prompts or messages to appear during the installation.
The update installer is one of the following programs:
- The self-extracting package program file (for example, Qnnnnnn_w2k_spx_x86_en.exe).
- Hotfix.exe (if you have extracted all the files from the package).
- After you install all the hotfixes, run QChain.exe.
- Restart the computer.
@echo offsetlocalset PATHTOFIXES=some path%PATHTOFIXES%\Q123456_w2k_sp2_x86.exe -z -m%PATHTOFIXES%\Q123321_w2k_sp2_x86.exe -z -m%PATHTOFIXES%\Q123789_w2k_sp2_x86.exe -z -m%PATHTOFIXES%\qchain.exe
How to obtain QChain.exeQChain.exe functionality is included in all Windows XP and Windows 2000 updates that were released since May 18, 2001, but an issue exists in updates that were released before December 2002 that may result in the wrong binary being placed on your computer in some circumstances. In March 2003, Microsoft released an updated version of QChain.exe to resolve this issue. For more information about this issue or to obtain the updated Qchain.exe tool, click the following article number to view the article in the Microsoft Knowledge Base:
The QChain.exe Command Syntax
Sample QChain.exe output
---- New Information In The Registry ------
Limitations of QChain.exeAlthough QChain works with most Windows NT 4.0 and Windows 2000 updates, QChain.exe may not work with updates that contain binary files that are listed in the following registry key:
Because the binaries that are listed in the
QChain affects only Pending File Rename Operations that perform binary replacement operations. It does not do anything with Pending File Rename Operations that perform delete operations.
All Windows NT 4.0 updates and all Windows 2000 updates that are earlier than SP2 use GetFileVersionInfo to identify the version of a file. If you install two or more Windows NT 4.0 updates or pre-SP2 Windows 2000 updates, and the updates contain overlapping KnownDLLs, the use of QChain to chain the installation of those updates does not make sure that the latest-versioned fix is installed.
The following scenario shows why QChain may not put the correct binary on the system:
- You install update packages A and B and you do not restart between installations.
- Both packages contain Kernel32.dll, a file that is in the KnownDLLs list. Package A includes Kernel32.dll version 3, package B includes Kernel32.dll version 2, and the computer has Kernel32.dll version 1 installed.
- When package A is installed, GetFileVersionInfo reports that the computer has Kernel32.dll version 1. Because package A includes version 3, the update installer identifies the need for file replacement.
- The update installer moves the Kernel32.dll version 1 on the computer to a temporary location and creates a Pending File Rename Operation to delete the Kernel32.dll file from the temporary location the next time the computer restarts.
- Package A's Kernel32.dll version 3 is copied to the computer.
- When package B installs, GetFileVersionInfo still reports that Kernel32.dll version 1 is installed on the computer because GetFileVersionInfo reads the version information from the Kernel32.dll that is loaded in memory. Package B has version 2, and the hotfix therefore identifies the need for file replacement.
- The update installer moves the Kernel32.dll that is now on the computer (package A's Kernel32.dll version 3) to a temporary location and creates a Pending File Rename Operation to delete the (version 3) Kernel32.dll from the temporary location the next time the computer restarts.
- Package B's Kernel32.dll version 2 is copied to the computer.
- QChain runs, but there are no Pending File Rename Operations for file replacement and QChain therefore does nothing.
- Because package B installed most recently, the package B Kernel32.dll version 2 is in the correct location on the computer. Therefore, it loads into memory when the computer restarts. The Pending File Rename Operations delete both the original Kernel32.dll version 1 and package A's Kernel32.dll version 3. As a result, the computer now has Kernel32.dll version 2 instead of version 3.
If you replay the previous scenario, and use post-SP2 Windows 2000 updates, the hotfix in package B maps package A's Kernel32.dll and recognizes version 3. Version 3 is later than package B's own Kernel32.dll version 2. Therefore, package B does not replace the Kernel32.dll that is on the system, and package A's Kernel32.dll version 3 is the version that the computer correctly uses after the computer restarts.
Artikli ID: 296861 – viimati läbi vaadatud: 09/14/2010 14:45:00 – redaktsioon: 16.0
- kbproductlink kbhotfixserver kbqfe kbwindowsupdatev6 kbwindowsupdatev3 kbfile kbgraphxlinkcritical kbinfo KB296861