大网数据广告活动
启动与系统组件

Command-line switches for Windows Update Standalone Installer

· 52CE 我爱测

Describes the consistent set of command-line switches that Microsoft is adopting for deploying packages that contain software updates.

Original KB number:   824687

Summary

You can use the Windows Update Standalone Installer (wusa.exe) to manually install or uninstall update packages from the command line on Windows Client or Windows Server systems. Update packages might include any of the update types that are described in Description of the standard terminology that is used to describe Microsoft software updates.

This article lists the switches that you can use together with wusa.exe.

For more information about how to use wusa.exe, see Description of the Windows Update Standalone Installer in Windows.

More information

The following commands provide examples of the syntax of wusa.exe.

  • wusa <update> [/quiet] [/norestart | /warnrestart:<seconds> | /promptrestart | /forcerestart] [/log:<file name>]
  • wusa /uninstall <update> [/quiet] [/norestart | /warnrestart:<seconds> | /promptrestart | /forcerestart] [/log:<file name>]
  • wusa /uninstall /kb:<KB number> [/norestart | /warnrestart:<seconds> | /promptrestart | /forcerestart] [/log:<file name>]

Wusa.exe supports the following switches:

Important:
Some switches might not be available in all versions of Windows. To see a list of switches that a particular computer supports, open a command prompt window, and then run wusa.exe /?.

  • /extract: Wusa.exe extracts the update package contents to a destination folder.

  • /help, /h or /?: Displays a dialog box that shows how to use wusa.exe, including a list of all its command-line switches and their behaviors.

  • /log:<file name>: Turns on logging and designates a destination file for the log.

  • /quiet: Run Wusa.exe in quiet mode without user interaction. The Microsoft Software License Terms don't appear. If the update requires that the computer restart, it restarts automatically without prompting the user.

    For example, if the Windows6.0-KB934307-x86.msu file is in the D:\934307 folder, type the following command at a command prompt to install the update package without user interaction:

    wusa.exe d:\934307\Windows6.0-KB934307-x86.msu /quiet

    You can use one of the following switches together with the /quiet switch:

    • /norestart: The computer doesn't restart after the update installs or uninstalls, even if the update requires a restart to take effect.
    • /promptrestart: If the update requires the computer to restart (after install or uninstall), wusa.exe prompts the user to restart the computer.
    • /forcerestart:<seconds>: After the update installs or uninstalls, wusa.exe forcefully closes applications and restarts the computer. The restart occurs even if the update doesn't require a restart for the changes to take effect.
    • /warnrestart: If the update requires the computer to restart (after install or uninstall), wusa.exe warns the user before it restarts the computer.
  • /uninstall <update> or /uninstall /kb:<KB number>: Removes the specified update. You can specify the update by file name or (by using the /kb switch) by KB number.

Data collection

If you need assistance from Microsoft support, we recommend you collect the information by following the steps mentioned in Gather information by using TSS for deployment-related issues.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
- Supported versions of Windows Client - Supported versions of Windows Server · Source date 10/26/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。