How to convert /fomusv parameter into PSADT

Hi All,

I’ve been trying to find this in the forum but can’t seem to find it. My question would be is how can I convert this msiexec command in PSADT?

command is msiexec /fomusv APS_PM_V11.msi /qn /norestart

The command I am using at the moment on my PSADT is execute-msi -Action Repair -Path “$dirfiles\APS_PM_V11.msi” -Parameters “/qn /NoRestart”

The syntax I use for PSADT is valid but I am having issues when I do a repair on some machines and the original installation source used for the app i am trying to repair is gone or changed its location, I get this message that the Installation source is missing if I try to manually do a repair
image

To get around that error, i use the /fomusv command from msiexec so that it wont look for the original source of the installation source.

This would also give me an idea hopefully how to translate msiexec commands into PSADT terms.

Any ideas please? help!

regards,
CA

Potentially daft question, but have you tried
-Parameters "/qn /NoRestart /fomusv"

If this is an msiexec parameter, that’s where I would expect it to go.

2 Likes

Hi,

Thanks for your response. I did try that just now but it still doesnt work for some reason. I get this when I use your command.

As if the syntax I used was incorrect.

I even tried the following:
-Parameters "/qn /NoRestart /omusv"
-Parameters "/qn /NoRestart /fv"

(attachments)

Just glancing at the manual, there is this parameter but it’s set to $false by default.
Execute-MSI -RepairFromSource

I see the PSADT function Execute-MSI has a parameter, “-SkipMSIAlreadyInstalledCheck”

Does that help in the scenario where “the original installation source used for the app i am trying to repair is gone or changed its location”

May be wrong MSI parameter… ??
REINSTALLMODE="fomusv"

Hi,

Try this: Execute-MSI -Action Repair -Path “$dirfiles\APS_PM_V11.msi” -Parameters “/qn /NoRestart” -RepairFromSource $true

I haven’t tested this myself but if you look in AppDeployToolkitMain.ps1 where it builds the MSI parameters for the specified “Action” you can see that if it’s a Repair action and you are using the -RepairFromSource switch it will add the /fvomus parameter that you want to use:

## Build the MSI Parameters
Switch ($action) {
    'Install' {
        $option = '/i'; [String]$msiLogFile = "$logPath" + '_Install'; $msiDefaultParams = $msiInstallDefaultParams
    }
    'Uninstall' {
        $option = '/x'; [String]$msiLogFile = "$logPath" + '_Uninstall'; $msiDefaultParams = $msiUninstallDefaultParams
    }
    'Patch' {
        $option = '/update'; [String]$msiLogFile = "$logPath" + '_Patch'; $msiDefaultParams = $msiInstallDefaultParams
    }
    'Repair' {
        $option = '/f'; If ($RepairFromSource) {
            $option += 'vomus'
        } [String]$msiLogFile = "$logPath" + '_Repair'; $msiDefaultParams = $msiInstallDefaultParams
    }
    'ActiveSetup' {
        $option = '/fups'; [String]$msiLogFile = "$logPath" + '_ActiveSetup'
    }
}

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.