Available command line switches for PatchInstall.exe

Article ID: 961726 - View products that this article applies to.
Expand all | Collapse all
Source: Microsoft Support

RAPID PUBLISHING

RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.

Symptom



Software Updates Installation Agent Syntax:

The Software Updates Installation Agent (PatchInstall.exe) has the following command-line options that you can use to specify how software updates should be installed on client computers. The parameters that are available for you to use are determined by the selections you make using the Distribute Software Updates Wizard.

In addition to the parameters you specify here, which control how the Software Updates Installation Agent installs the updates you include in a package, you must also use the Distribute Software Updates Wizard to provide parameters specific to the individual updates, to control the installation behavior of each update. For more information, see Providing Parameters for Software Update Installation, below.

Command Line Parameter Description

/g:xxx (hours) Use this parameter to set the grace period (in hours) after which the installation of the software update becomes mandatory.

The grace period is based on either the date/time property created when the software update is authorized for deployment, or the date/time property created when each software update is initially inventoried.

To determine when the grace period will expire, the authorized time or detected time (subject to the /d parameter, below) will be added to the grace period then compared to local time. This calculation is influenced by the Coordinated Universal Time setting (for more information, see Software Update Propertiesin the help available from each page of the Distribute Software Updates Wizard Help).

The range of values for this parameter is from zero (0) to 999 hours. The default setting is 336 hours, or 14 days.

If you enter a value of zero (0) for this parameter the grace period expires immediately, making update installation mandatory, with no opportunity to postpone installation.

The /g parameter is optional. If you do not specify a value for this parameter, the grace period feature is disabled, and the update will never expire (installation will be optional for users).

 /p Use this parameter to specify that the default action that the Software Updates Installation Agent takes on behalf of an unresponsive user is to postpone installation of the update.

If you use this parameter, the Software Updates Installation Agent will not install software updates by default until the installation grace period (specified using the /g parameter) expires. However, each time the advertisement for the update occurs, the user will have the opportunity to install the software updates even if the grace period has not expired.

 

By default, without the /p parameter, the Software Updates Installation Agent will automatically install the updates for unresponsive users after the countdown period specified using the /c parameter expires.

 /i Use this parameter to enforce the grace period for each update individually, rather than enforcing the grace period for the group of updates within the same SMS package.

When you specify this parameter, the Software Update Installation Agent will apply grace period expiration to individual updates, rather than an entire package of updates. This means that mandatory installation will only take place for updates whose installation grace period has expired.

With the /i parameter in effect, when the user clicks Install Now in the Software Updates Installation Agent user interface, expired updates and optional (currently unexpired) updates will both be available for installation. The list of updates shown to the user will include expired updates and optional updates with an indication of the state of each update, allowing the user to proactively install unexpired updates along with the expired updates.

Without the /i parameter, when one of the updates expires and the user clicks Install Now, all of the updates in the package will install.

/z:s|w|sw Use this parameter to suppress post-installation restart requests, and to make restarting the computer optional after installation.

After all the updates that were able to install complete the installation process, the Software Updates Installation Agent will determine whether the computer needs to restart. For more information on the Qchain information used during this process, go to the Microsoft Support Web site http://support.microsoft.com/default.asp and refer to Knowledge Base article Q296861.

This parameter can be useful in server environments or in cases where you do not want the computers that are installing the updates to restart by default. However, note that causing a computer to restart after installation ensures that software updates take effect, and that suppressing post-installation restart requests can leave your system in an insecure state.

The default case (without the /z command) will provide no restart suppression.

If you enter the parameter and option /z:w, the requested to restart (if any) will be suppressed only if the computer installing the update is a workstation.

If you enter the parameter and option /z:s, the requested restart (if any) will be suppressed only if the computer installing the update is a server role.

If you enter the parameter and options /z:sw, the requested restarts (if any) will be suppressed for both workstation roles as well as server roles.

 

/f If you use this parameter, the forced restart will only take place if the Software Updates Installation Agent finds indications that a restart is needed. This parameter explicitly does not mean that the computers will always be forced to restart after any update installation; if used, it will only apply to the current scheduled run of the advertisement.

 

Use caution when using this parameter. If a computer is forced to restart with this command-line parameter in effect, users could lose any unsaved changes on the desktop. Therefore, only use this parameter when business needs require that the updates take effect immediately, regardless of possible data loss.

By default, without the /f parameter, the computers installing the software updates will restart, allowing each application with unsaved changes the opportunity to prompt users before the computer restarts.

/c:xx (minutes) Use this parameter to set the countdown period (in minutes) after which the Software Updates Installation Agent will take action on behalf of an the unresponsive user. The action can include automatic installation of the update, postponement of installation, or post-installation system restarts (configured using the /p the /z, and the /f parameters).

This countdown is useful in cases where a software update installation is necessary, but no user is present to provide input. The delays that could be caused by such cases are important, because while the user interface for software update installation is displayed, all other software distribution using SMS is blocked for that computer. After the countdown expires, the update installation cycle proceeds automatically.

Following the installation, if a system restart is determined to be needed and has not been explicitly suppressed, a countdown will begin allowing users time to save their work.

The same value that you enter for the countdown will be used for both the pre-installation countdown (automatic installation if no user input is received) and the post-installation countdown (restart the computer if restart is not suppressed).

The range of values for this parameter is from zero (0) to 99 minutes. The default setting is 5 minutes.

If you enter a value of zero (0) for this parameter, installation will start immediately.

/t:xx (minutes) Use this parameter to set the failsafe timeout (in minutes) after which a software update is considered unresponsive and that particular update installation is terminated.

Because software updates can come from a wide range of sources with a wide array of behaviors, it is recommended that you proceed with the installation of an update even if it appears to have become unresponsive. However, if an update is permitted to remain unresponsive for a long period of time, it could leave the system in a vulnerable and inconsistent state. Therefore, it is necessary to set the timeout value to allow an unresponsive update to be disabled.

 

If one or more updates in a list reach the time-out limit, the agent will assume that a system restart is needed to ensure the system can be restored to a consistent state (this parameter is subject to the /z reboot suppression parameter discussed above).



The range of values for this parameter is from zero (0) to 99 minutes. The default setting is 60 minutes.

If you enter a value of zero (0) for this parameter, the update will not be given any time to install. To avoid this problem, a minimum of 10 minutes should be allowed for this timeout value.

Note: The Software Updates Installation Agent will continue to record exit codes for as long as it can. However, after the failsafe timeout has expired, the currently executing update will be terminated and its exit code will indicate failure.

/r Use this parameter to include status messages and exit codes for successful update installations (for each update).

The default for this parameter is set so that only the failing exit codes are included in the per-update status messages. However, by using the /r parameter, you can specify that success messages and exit codes also be included in the per-update status messages.

 /d Use this parameter to specify that the grace period be based on the time that the update was first determined to be applicable to the client computer rather than the time the update was authorized.

The default value for this parameter, after which the installation of the software update becomes mandatory, is the time of authorization plus the grace period specified by the /g parameter discussed above.

 /s Use this parameter to suppress the hardware inventory agent from initiating a hardware inventory cycle after update installation.

Initiating hardware inventory at times other than the scheduled hardware inventory frequency can increase network and server load. The /s parameter will be used as the default setting when the Distribute Software Updates Wizard configures the program command line for the Software Updates Installation Agent.

More Information



Providing Parameters for Software Update Installation:

 

The Parameters column in the software updates table on the Software Updates Status page of the Distribute Software Updates Wizard displays the command-line parameters that will be used with the individual updates to control update installation behavior.

 

If no value appears in the Parameters column, it is recommended that you provide parameters for each update.  To configure parameters for an update, on the Software Update Status page of the wizard, click Properties, and then use the Parameters box and click Syntax on the Software Update Properties dialog box.

 

Important: We strongly recommended that you specify command-line options for each software update to suppress the following:

 

·         User Interface

·         Post-installation restart

 

This will allow the update to install without presenting dialog boxes to the user or initiating restarts of the system.

 

Neither the Distribute Software Updates Wizard nor the Software Updates Installation Agent can prevent individual updates from performing system restarts or prompting the user. Only the command-line syntax specific to the individual updates can control the update user interface or restart behavior.

 

You can find the information necessary to configure the appropriate behavior for individual updates by clicking Syntax on the Software Update Properties dialog box for the update. This will the open Microsoft Knowledge Base article associated with the update that specifies command-line options specific to the update.

 

If you do not specify the appropriate command-line options for each update, updates may restart the computer several times, and prompt the user frequently during installation.

 

For more information please see DistribSWUpdates.chm.  This help file is located in the same folder as PatchWiz_ENU.exe.

Collapse this tableExpand this table


/g:xxx (hours)


Three radio buttons on the first Configure Agent Settings page:

• Require updates to be installed as soon as they are advertised (/g:0)
• Users can postpone updates indefinitely (no /g parameter)
• Allow users to postpone installation for: (/g:xxx, where xxx is specified in the Allow user to postpone installation box.


Use this switch to set the grace period (in hours) after which the installation of the software update becomes mandatory.
The grace period is based on either the date/time property created when the software update is authorized for deployment, or the date/time property created when each software update is initially inventoried.
To determine when the grace period will expire, the authorized time or detected time (subject to the /d option, below) will be added to the grace period then compared to local time. This calculation is influenced by the Coordinated Universal Time setting.
The range of values for this switch is from zero (0) to 999 hours. The default setting is 336 hours, or 14 days.
If you enter a value of zero (0) for this parameter the grace period expires immediately, making update installation mandatory, with no opportunity to postpone installation.
The /g switch is optional. If you do not specify it, the grace period feature is disabled, and the update will never expire (installation will be optional for users).


/d


The From setting associated with the Allow user to postpone installation setting on the first Configure Agent Settings page.


Use this switch to specify that the grace period is based on the time that the update was first determined to be applicable to the SMS client computer rather than the time the update was authorized.
The default value for this switch, after which the installation of the software update becomes mandatory, is the time of authorization plus the grace period specified by the /g parameter discussed above.


/s


The Report inventory changes only when inventory is scheduled check box on the second Configure Agent Settings page.


Use this switch to suppress the hardware inventory agent from initiating a hardware inventory cycle after update installation.
Initiating hardware inventory at times other than the scheduled hardware inventory frequency can increase network and server load. The /s switch is used as the default setting when the Distribute Software Updates Wizard configures the program command line for the Software Updates Installation Agent.


/p


The After Waiting field on the first Configure Agent Settings page.


Use this switch to specify that the default action that the Software Updates Installation Agent takes on behalf of an unresponsive user is to postpone installation of the update.
If you use this switch, the Software Updates Installation Agent does not install software updates automatically until the installation grace period (specified using the /g parameter) expires. However, each time the advertisement for the update occurs, the user will have the opportunity to install the software updates even if the grace period has not expired.
By default, without the /p switch, the Software Updates Installation Agent automatically installs the updates for unresponsive users after the countdown period specified using the /c parameter expires.


/i


Force installation of required updates only check box, on the first Configure Agent Settings page.


Use this switch to enforce the grace period for each update individually, rather than enforcing the grace period for the group of updates within the same SMS package.
When you specify this switch, the Software Updates Installation Agent applies grace period expiration to individual updates, rather than to an entire package of updates. This means that mandatory installation only takes place for software updates for which the installation grace period has expired.
With the /i parameter in effect, when the user clicks Install Now in the Software Updates Installation Agent user interface, expired updates and optional (currently unexpired) updates are both available for installation. The list of updates shown to the user will include expired updates and optional updates with an indication of the state of each update, allowing the user to proactively install unexpired updates along with the expired updates.
Without the /i switch, when one of the updates expires and the user clicks Install Now, all of the updates in the package will install.


/z:s|w|sw


The Postpone automated system restarts setting and associated settings on the second Configure Agent Settings page.


Use this switch to suppress automatic post-installation restart requests, and to allow the user to postpone restarting the computer after installation.
This switch can be useful in server environments or in cases where you do not want the computers that are installing the updates to restart by default. However, note that causing a computer to restart after installation ensures that software updates take effect, and that suppressing post-installation restart requests can leave your system in an insecure state.
The s|w|sw arguments allow you to turn off automatic restarts by type of SMS client computer, as follows. (Note that the /z command cannot be used without the s|w|sw arguments)

The default case (without the /z command) allows automatic restarts if required.
/z:w disables automatic restart (if required) for workstations only.
/z:s disables automatic restart (if required) for servers only.
/z:sw disables automatic restart (if required)for both servers and workstations.


/f


The Force client programs to close and discard any unsaved data check box on the second Configure Agent Settings page.


Use this switch to force automatic post-installation restart requests, even if there are running programs with unsaved data on the SMS client computer. This switch takes precedence over the /z switch, above.
Caution

Use caution when using this switch. If a computer is forced to restart with this command-line switch in effect, users could lose any unsaved changes on the desktop. Therefore, only use this switch when business needs require that the software updates take effect immediately, regardless of possible data loss.
By default, without the /f switch, the Software Updates Installation Agent uses the built-in Shutdown process of the operating system, allowing each open application to display a File Save dialog to the user.
Important

If you use this switch, the forced restart will only take place if the Software Updates Installation Agent finds indications that a restart is needed. This switch explicitly does not mean that the computers will always be forced to restart after any update installation. If used, this switch only applies to the current scheduled run of the advertisement.


/c:xx (minutes)


The Specify how long the agent should wait for a user or unresponsive update: setting and associated settings on the first Configure Agent Settings page.


Use this switch to set the countdown period (in minutes) after which the Software Updates Installation Agent will take action on behalf of an unresponsive user. The action taken following the countdown depends on the other settings that have been specified, and can include: automatic installation of the update, postponement of installation, or post-installation system restarts (configured using the /p the /z, and the /f parameters).

This countdown is useful in cases where a software update installation is necessary, but no user is present to provide input. The delays that could be caused by such cases are important, because while the user interface for software update installation is displayed, all other software distribution using SMS is blocked for that computer. After the countdown expires, the update installation cycle proceeds automatically.

Following the installation, if a system restart is needed and has not been explicitly disabled, a countdown begins allowing users time to save their work. The value that you enter for the countdown is used for both the pre-installation countdown (automatic installation if no user input is received) and the post-installation countdown (restart the computer if restart is not suppressed).

The range of values for this switch is from zero (0) to 99 minutes. The default setting is 5 minutes.

If you enter a value of zero (0) for this switch, installation will start immediately.


/t:xx (minutes)


The Wait <N> minutes for the update and then cancel installation setting on the first Configure Agent Settings page.


Use this switch to set the failsafe timeout (in minutes) after which a software update is considered unresponsive and that particular update installation is terminated.

Because software updates can come from a wide range of sources with a wide array of behaviors, it is recommended that you proceed with the installation of an update even if it appears to have become unresponsive. However, if a software update is permitted to remain unresponsive for a long period of time, it could leave the system in a vulnerable and inconsistent state. Therefore, it is necessary to set the timeout value to allow an unresponsive update to be disabled.
If one or more software updates in a package reach the time-out limit, the Software Updates Installation Agent assumes that a system restart is needed to ensure the system can be restored to a consistent state (this parameter is subject to the /z restart suppression parameter).
The range of values for this switch is from zero (0) to 99 minutes. The default setting is 30 minutes.
If you enter a value of zero (0) for this switch, the update will not be given any time to install. To avoid this problem, a minimum of 10 minutes should be allowed for this timeout value.
Note

The Software Updates Installation Agent will continue to record exit codes for as long as it can. However, after the failsafe timeout has expired, the currently executing update will be terminated and its exit code will indicate failure.


/q


The Use notification balloons or dialogs setting on the third Configure Agent Settings page.


Use this switch to configure the Software Updates Installation Agent to install the specified updates without user interface or interaction. When you specify this switch, the only user interface that appears on the client is the operating system's progress dialog box that indicates that a system restart is being initiated.
Important

Because this switch allows no user interaction by definition, you should not use it in combination with other switches that assume that user interaction is available. In particular, you should not use this switch without also specifying the /g switch, because this would mean that the software updates in the package would be indefinitely postponed. In general, you should specify /g:0 when using /q.


/x


The Create reference computer templates during processing setting on the third Configure Agent Settings page.


Use this switch to create a reference software updates authorization list file that you can use to distribute software updates to your enterprise in an expedited manner. You use this switch when you use a reference computer for expedited approval processing.

When you run Patchinstall.exe with the /x switch, a local copy of the software updates authorization list, type_patchauthorize.xml (where type is the software update type) is output to the temp directory of the current user (%temp%). This file contains a list of all software updates currently applicable to the SMS client computer, whether installed or needed.


/n


The Provide reminders and allow users to reschedule software updates until they become required setting on the third Configure Agent Settings page.


Use this switch to enable the persistent notification icon, an Advanced Client feature that provides local reminders and allows users to reschedule software updates on computers running SMS Advanced Client. This reminder process is independent of the advertisement schedule, and allows the administrator to reduce the advertisement frequency when advertising software updates to collections of computers running the SMS Advanced Client. The interval at which the reminders occur is hard-coded to every three hours.
Users can interact with the notification area icon to:

Check for upcoming installations
Schedule installations and restarts to occur at convenient times of day
Install software updates immediately
Remind users of a need for a restart until the requirement is satisfied, if restart is postponed during initial software update installation
Note

The /n switch has no effect on computers running the SMS Legacy Client.
If the /q switch is specified, the /n switch is ignored.


/l:xxx


The Use a change window setting and associated settings on the third Configure Agent Settings page.


Use this switch to specify the duration of the change window (the time within which configuration changes are permitted in scheduled software updates installations.)
The range of values for this parameter is from zero (0) to 480 minutes. The default setting is 90 minutes.
If you enter a value of zero (0) for this parameter, the update will not be given any time to install. To avoid this problem, a minimum of 30 minutes should be allowed for this software update installation window.
The start time for the scheduled software update installation is the scheduled start time for the advertisement. For more information, see Configure Scheduled Software Update Installations in Help.


/m:"<filename>"


Accessed with Advanced on the Identify the SMS package page when modifying an existing package authorization.


Use this switch to specify the authorization list file, by default, PatchAuthorize.xml. You can use this option when you want to specify an authorization file other than PatchAuthorize.xml.

DISCLAIMER

MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.

Properties

Article ID: 961726 - Last Review: May 15, 2009 - Revision: 2.0
APPLIES TO
  • Microsoft Systems Management Server 2003
Keywords: 
kbrapidpub kbnomt KB961726

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