This project is read-only.

Repair-MSIProduct

Synopsis

Repairs or modifies a product package.

Syntax

Repair-MSIProduct [-Path] <string[]> [-ReinstallMode <ReinstallModes>] [-PassThru] [-Log <string>] [-Properties <string[]>] [-Chain] [-Force] [<CommonParameters>]

Repair-MSIProduct -Product <ProductInstallation[]> [-ReinstallMode <ReinstallModes>] [-PassThru] [-Log <string>] [-Properties <string[]>] [-Chain] [-Force] [<CommonParameters>]

Repair-MSIProduct -LiteralPath <string[]> [-ReinstallMode <ReinstallModes>] [-PassThru] [-Log <string>] [-Properties <string[]>] [-Chain] [-Force] [<CommonParameters>]

Repair-MSIProduct -ProductCode <string[]> [-ReinstallMode <ReinstallModes>] [-PassThru] [-Log <string>] [-Properties <string[]>] [-Chain] [-Force] [<CommonParameters>]

Description

By default, simply repairs an existing product. This cmdlet can also add or remove features, patches, or even uninstall but there are specialized cmdlets for that.

Progress, warnings, and errors during the install are sent through the pipeline making this command fully integrated.

Parameters

-Chain <SwitchParameter>

Whether to repair all packages together.

Required? false
Position named
Default value|
Accepts pipeline input? false
Accept wildcard charactrs? false

-Force <SwitchParameter>

Whether to suppress all prompts.

Required? false
Position named
Default value|
Accepts pipeline input? false
Accept wildcard charactrs? false

-LiteralPath <string[]>

The path to a product package to repair. The value of -LiteralPath is used exactly as typed. No characters are interpreted as wildcards.

Required? true
Position named
Default value|
Accepts pipeline input? true (ByPropertyName)
Accept wildcard charactrs? false

-Log <String>

The path to the log file. This use the file name as the base name and will append timestamp and product-specific information.

Required? false
Position named
Default value|
Accepts pipeline input? false
Accept wildcard charactrs? false

-PassThru <SwitchParameter>

Whether to pass the newly installed patch information after installation to the pipeline.

Required? false
Position named
Default value|
Accepts pipeline input? false
Accept wildcard charactrs? false

-Path <string[]>

The path to a product package to repair. Wildcards are permitted. You can specify * in any part of the path to select all matching files.

Required? true
Position 0
Default value|
Accepts pipeline input? true (ByValue, ByPropertyName)
Accept wildcard charactrs? true

-Product <Microsoft.Deployment.WindowsInstaller.ProductInstallation[]>

An existing product to repair or modify.

Required? true
Position named
Default value|
Accepts pipeline input? true (ByValue)
Accept wildcard charactrs? false

-ProductCode <string[]>

The ProductCode of an existing product to repair or modify.

Required? true
Position named
Default value|
Accepts pipeline input? true (ByPropertyName)
Accept wildcard charactrs? false

-Properties <string[]>

Additional property=value pairs to pass during repair.

Required? false
Position named
Default value|
Accepts pipeline input? true (FromRemainingArguments)
Accept wildcard charactrs? false

-ReinstallMode <Microsoft.Deployment.WindowsInstaller.ReinstallModes>

The REINSTALLMODE to use. You can specify the value as a string in the format used by Windows Installer. The default is equivalent to "omus".

Required? false
Position named
Default value FileOlderVersion,MachineData,UserData,Shortcut
Accepts pipeline input? true (ByPropertyName)
Accept wildcard charactrs? false

Inputs

  • Microsoft.Deployment.WindowsInstaller.ProductInstallation: The product to repair or modify.

Outputs

  • Microsoft.Deployment.WindowsInstaller.ProductInstallation: Information for the newly repaired product.

Examples

Example 1

repair-msiproduct -productcode {12341234-1234-1234-1234-123412341234} -reinstall "pecmsu" -log $env:TEMP\repair.log

Repair the specified product using REINSTALLMODE="pecmsu" and log to the TEMP directory.

Example 2

get-msiproductinfo -name *TEST* | repair-msiproduct -chain

Repair all products with ProductName matching TEST and show a single progress bar for the entire operation.

Related Links


Last edited Jun 11, 2013 at 10:41 AM by heaths, version 2

Comments

No comments yet.