0

I am fairly new to powershell scripting.

I need to silently install an msi file using PowerShell with dynamic property. I am able to edit the location where the file will be installed.

Start-Process msiexec.exe -Wait -ArgumentList '/I C:\Users\myAdmin\Desktop\sample\myMSI.msi INSTALLDIR=C:\myfolder /quiet'

What I need to do now is change the selected RadioButton that has been selected from the default value of "Connectivity Only" to "Client & administrator". I got the property of the radio button using superOrca.

enter image description here I am having problem when I add the InstallMode to the arguement as it does not reflect in the installation

Start-Process msiexec.exe -Wait -ArgumentList '/I C:\Users\myAdmin\Desktop\sample\myMSI.msi INSTALLDIR=C:\myfolder InstallMode=1000 /quiet'  

Any ideas how to change the selected radiobutton?

PhilDW
  • 20,260
  • 1
  • 18
  • 28
Rey Norbert Besmonte
  • 791
  • 2
  • 12
  • 29

1 Answers1

1

InstallMode in your screenshot is not an actual Windows Installer property, so you cannot use it that way. In any case, all Windows Installer properties passed on the command line must be public (all uppercase) so a mixed-case property wouldn't work anyway.

The property name to use is shown in the properties window of the RadioButtons dialog, in a two-button dialog its default name is BUTTON2 and the value will either be 1 or 2, so that's what you pass on the command line. It's somewhat similar to this:

How to code for Custom Dialog in Setup Project?

PhilDW
  • 20,260
  • 1
  • 18
  • 28