Command line arguments for Deploy-Application.EXE

Topics: Archive - Deployment Scripts, Archive - General
Oct 1, 2014 at 2:07 PM
I'm wondering if there is any syntax to apply command line arguments to Deploy-Application.EXE? I would like to pass variables into powershell to run the install in different ways.

A couple examples of stuff we do in Wise today.
  • /Admin argument to install the admin version of an install as opposed to the client
  • /Repair argument to run an installshield with a repair .iss instead of an install.
  • /Patch to just run a patch portion of the install.
These arguments allow me to utilize one package with different programs in SCCM to install multiple ways. It would be nice to use an argument to set a variable along with the DeploymentType to run certain actions.

Also, a second question to repair. I notice there is a lot of MSI automation. Is there anything to tell an MSI that is already installed to just run a repair?
Coordinator
Oct 2, 2014 at 8:17 PM
You'd have to edit the WiseScript yourself. You can specify different Deploy-Application.ps1 scripts but not what you're looking for.

For the repair, you can use Get-InstalledApplication to get the product code of existing app and Execute-MSI function to run repair.