Command-line switches for Windows software update packages

Article translations Article translations
Article ID: 262841 - View products that this article applies to.
This article was previously published under Q262841
Expand all | Collapse all

On This Page

SUMMARY

Some Microsoft software updates use Hotfix.exe or Update.exe as the Setup program. These Setup programs check your Windows service pack version and operating system language, install and register the software update on your computer, and back up files to allow for removal of the software update.

Software updates that use one of these Setup programs support several command-line switches that administrators can use to deploy the updates.

To determine whether a software update uses Hotfix.exe or Update.exe as the Setup program for packages released after July 2004, examine the Installer Engine value on the Version tab of the Properties dialog box for the software update package. For packages released before July 2004, you must extract the package contents to check which installer is used.

INTRODUCTION

Microsoft packages software updates using several different self-extracting file formats that automatically run a Setup program that is contained inside the package. This article describes the command-line switches that you can use with software update packages that use Hotfix.exe or Update.exe as the Setup program. This is referred to in the rest of this article as "Windows software update packages."

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

MORE INFORMATION

To determine whether a software update package uses Update.exe as the Setup program, and to determine what version it uses, follow these steps:
  1. Right-click the package, and then click Properties.
  2. On the Version tab, under Other Version Information, click Installer Engine. Update.exe should appear in the Value field.
  3. To determine the version, click Installer Version. The the version of the installer that is used in the package appears in the Value field.
For packages released before July 2004, or those packages whose Description value on the General tab is Self-Extracting Cabinet, follow these steps to determine whether Update.exe or Hotfix.exe is used, and to determine what version is used:
  1. Extract the software update package to a unique temporary folder. For example, to extract the files for an update package that is named KBArticleNumber.exe to a folder that is named ExtractedPackage on drive C, type the following at a command prompt:
    KBArticleNumber /X:C:\ExtractedPackage
  2. Open the temporary folder that contains the extracted files for the software update package. For example, open C:\ExtractedPackage.
  3. Locate the Update.exe or Hotfix.exe file in the temporary folder or a subfolder.
  4. To determine the version of Update.exe or Hotfix.exe, right-click that file and then click Properties.
  5. Click the Version tab, and then note the value on the File version line.

Note If the package description is Win32 Cabinet Self-Extractor, the software update package is an IExpress package. For additional information, click the following article number about IExpress packages to view the article about IExpress packages in the Microsoft Knowledge Base:
197147 Command-line switches for IExpress software update packages


If the package uses the .msi or .msp file name extension, the software update package uses Windows Installer as the Setup program. For additional information about command-line options that Windows Installer uses, visit the following Microsoft Web site:
http://msdn2.microsoft.com/en-us/library/aa367988.aspx
Software updates for Windows NT 4.0 and those included in Windows 2000 Service Pack 3 or earlier use Hotfix.exe as the Setup program.

Update.exe is used as the Setup program for software updates that are included in Windows 2000 Service Pack 4 and later versions and that are included in Windows XP and Windows Server 2003.

Note Some software update packages for the versions of Windows that are listed in the "Applies to" section use IExpress or Windows Installer packages. These packages do not use Hotfix.exe or Update.exe as the Setup program.

Overview of the installation process

When you run a Windows software update package without command-line switches, the Hotfix.exe or Update.exe Setup program is automatically run to install the software update. The following actions are performed by the Setup program:
  • The installation program (Hotfix.exe or Update.exe) examines the service pack version you currently are using. If your service pack version is earlier than the software update version, but not earlier than the minimum version specified by the software update, and the language is the same, the Setup program automatically installs the software update. If your service pack version is later than the software update version, the installation does not continue.
  • If the software update language version does not match your operating system language, the installation does not continue.
  • If no version conflict exists, Hotfix.exe or Update.exe installs the software update.
  • The installation program registers the software update under one of the following registry keys:
    HKEY_LOCAL_MACHINE \Software\Microsoft\Updates\<operating system>\<service pack level>\KB<nnnnnn>
    HKEY_LOCAL_MACHINE \Software\Microsoft\Windows NT\CurrentVersion\Hotfix\Q<nnnnnn>
    HKEY_LOCAL_MACHINE \Software\Microsoft\Windows NT\CurrentVersion\Hotfix\KB<nnnnnn>
  • Removal information for the software update is stored in a hidden folder named $NtUninstallQnnnnnn$ or $NtUninstallKBnnnnnn$ in %Systemroot%.

Command-line switches for the Update.exe program

The following tables list the command-line switches that are supported by each different version of the Update.exe program.

Collapse this tableExpand this table
Standard switchDescription of the switchVersions of Update.exe that support this switch
/helpDisplays command-line help.Version 5.3.24.3 and later versions support the /help switch. For compatibility with older versions, the /? switch can be used.
/passiveUnattended Setup mode. No user interaction is required, but installation status is displayed. If a restart is required at the end of Setup, a dialog box will be presented to the user with a timer warning that the computer will restart in 30 seconds.Version 5.3.24.3 and later versions support the /passive switch. For compatibility with older versions, the /u switch can be used.
/quietQuiet mode - same as unattended mode, but no status or error messages are displayed.Version 5.3.24.3 and later versions support the /quiet switch. For compatibility with older versions, the /q switch can be used.
/norestartDo not restart the computer when the installation is finished.Version 5.3.24.3 and later versions support the /norestart switch. For compatibility with older versions, the /z switch can be used.
/warnrestartPresents a dialog box with a timer warning the user that the computer will restart in x seconds. (Default is 30 sec). Intended for use with either /quiet or /passive switches.Version 6.1.22.0 and later versions support the /warnrestart switch.
/forcerestartRestart the computer after installation and force other applications to close at shutdown without saving open files first.Version 5.3.24.3 and later versions support the /forcerestart switch.
/promptrestartPresents a dialog box to prompt user to restart if required. Intended for use with /quiet.Version 6.1.22.0 and later versions support the /promptrestart switch.
/forceappscloseForces other programs to close when the computer shuts down.Version 5.4.15.0 and later versions support the /forceappsclose switch. For compatibility with older versions, the /f switch can be used.
/nobackupDo not back up files for uninstall.Version 6.1.22.0 and later versions support the /nobackup switch. For compatibility with older versions, the /n switch can be used.
/overwriteoemOverwrite OEM files without prompting.Version 6.1.22.0 and later versions support the /overwriteoem switch. For compatibility with older versions, the /o switch can be used.
/integrate:pathIntegrates the software updates into the Windows installation source files located at the path specified. Note that :path refers to the folder that contains the i386 folder.Version 5.4.15.0 and later versions support the /integrate:path switch. For compatibility with older versions, the /s switch can be used.
/log:pathAllows user to specify where to create the log file.Version 6.1.22.0 and later versions support the /log switch.
/EREnable extended error reporting.All versions support the ER switch.
/verboseEnable verbose logging. Creates %Windir%\CabBuild.log upon install that details files to be copied. Using this switch may cause the installation to occur much slower.Version 5.3.24.3 and later versions support the /verbose switch. For compatibility with older versions, the /v switch can be used.
/d:pathSpecifies a backup directory for Windows Service Pack installation. :path indicates the destination folder for the backup files. The default backup location is %Systemdrive%\$ntservicepackuninstall$. This switch is not available for updates other than Service Packs and is available only in Installer versions 5.3.16.5 and later versions.
/extract[:path]Extracts files without starting Setup. If ":path" is not included, you are prompted for the path of a destination folder to extract the files. If ":path" is used, the files are extracted to the specified destination folder.Version 5.3.24.3 and later versions support the /extract switch. For compatibility with older versions, the /x switch can be used.
/hotpatch:disableDisables hotpatching functionality, and installs the cold patch only.This is only to be used for Windows Server 2003 packages that support hotpatching and is available in versions 6.1.22.0 and later. For more information on hotpatching, see the "References" section in this article for a link to the "Inside Update.exe" whitepaper.


Notes
  • We are adopting a consistent set of command-line switches that you can use to deploy packages that contain software updates. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
    824687 Command-line switches for Microsoft software update packages
    For backward compatibility, Windows software updates that implement the new standard switch names also support the setup switches that are used by the earlier version of the Update.exe. However, we recommend that you stop using the old switches because this support may be removed in future software updates.
  • All the switch options that are listed use a forward slash (/). For compatibility with older versions, a hyphen (-) can still be used instead of the forward slash (/).
  • To safely remove a software update, remove the one most recently installed first. For example, assume that hotfix A and hotfix B both replace the same file or registry keys, and that you installed hotfix A before you installed hotfix B. To return your system to the state before the installation of hotfix A, you must uninstall hotfix B before you uninstall hotfix A. For more information about how to remove Update.exe updates, click the following article number to view the article in the Microsoft Knowledge Base:
    823836 Removing Windows software updates in the wrong order may cause the operating system to stop functioning

Command-line switches for the Hotfix.exe program

The following table lists the command-line switches that are supported by the Hotfix.exe program.
Collapse this tableExpand this table
Command-line switchDescription
/fForce other programs to quit at shutdown
/lList installed software updates
/mUnattended mode
/nDo not back up files for uninstallation
/qQuiet mode - no user interaction required
/yPerform uninstallation (must be used with /m or /q)
/zDo not restart the computer after the installation

For more information about how to install and remove software updates that use Hotfix.exe, click the following article number to view the article in the Microsoft Knowledge Base:
184305 How to install and remove hotfixes with Hotfix.exe

REFERENCES

For more information about how to remove software updates, visit the following Microsoft Web site:
http://technet.microsoft.com/en-us/library/cc738788.aspx
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
934307 Description of the Windows Update Stand-alone Installer (Wusa.exe) and of .msu files in Windows Vista

Properties

Article ID: 262841 - Last Review: November 3, 2008 - Revision: 12.1
APPLIES TO
  • Microsoft Windows Server 2003, 64-Bit Datacenter Edition
  • Microsoft Windows Server 2003, Enterprise x64 Edition
  • Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003, Web Edition
  • Microsoft Windows XP Professional
  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Tablet PC Edition
  • Microsoft Windows XP Media Center Edition 2005 Update Rollup 2
  • Microsoft Windows XP Media Center Edition 2004
  • Microsoft Windows XP 64-Bit Edition Version 2002
  • Microsoft Windows XP 64-Bit Edition Version 2003
  • Microsoft Windows 2000 Datacenter Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional Edition
  • Microsoft Windows 2000 Server
  • Microsoft Windows NT Server 4.0, Terminal Server Edition
  • Microsoft Windows NT Server 4.0 Standard Edition
  • Microsoft Windows NT Workstation 4.0 Developer Edition
Keywords: 
kbproductlink kbinfo kbsetup kbupgrade KB262841

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com