Set-CMDeploymentTypeInstallBehavior

Modify the executable files that need to close for the app install to succeed.

Syntax

Set-CMDeploymentTypeInstallBehavior
   -InputObject <IResultObject>
   -ExeFileName <String>
   [-NewExeFileName <String>]
   [-DisplayName <String>]
   [-PassThru]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Starting in version 2107, use this cmdlet to modify the executable files that need to close for the app install to succeed. For more general information on the install behavior feature, see Check for running executable files.

If you use PowerShell to deploy the application, use the AutoCloseExecutable parameter on either New-CMApplicationDeployment or Set-CMApplicationDeployment. This parameter enables the application deployment setting for install behaviors.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Change the executable file install behavior

This example changes the executable file that's checked on the CenterApp application from notepad.exe to calc.exe.

$appName = "CenterApp"
$dtName = "InterDept - Windows Installer (.msi file)"
$msi_dt = Get-CMDeploymentType -ApplicationName $appName -DeploymentTypeName $dtName
Set-CMDeploymentTypeInstallBehavior -InputObject $msi_dt -ExeFileName "notepad.exe" -NewExeFileName "calc.exe" -DisplayName "Calculator"

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisplayName

Specify a friendly name for the specified executable to help you identify it.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ExeFileName

Specify the name of the target executable file. To change this executable file, use the NewExeFileName parameter. To change the friendly name, use the DisplayName parameter.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Specify an application deployment type object to modify this setting. To get this object, use the Get-CMDeploymentType cmdlet.

Type:IResultObject
Aliases:DeploymentType
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-NewExeFileName

Specify the name of the new target executable file. The Configuration Manager client checks if this file name is running.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Add this parameter to return an object that represents the item with which you're working. By default, this cmdlet may not generate any output.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

IResultObject

Notes

For more information on this return object and its properties, see SMS_Application server WMI class.