Question

I am creating a setup using InstallShield(Limited Edition) in VS2012. Firstly I created a setup file. I have some more things to do so I created a project and added its exe as a new custom action After Initialization(Before First Dialog).

Custom Actions InstallShield Image

Now I want to run this setup from command line and pass parameter(s) to it. I tried using %1 to take first parameter entered by command line but it is not working. Please tell how to pass parameters using command line and use it in exe file.

Was it helpful?

Solution

Unless I'm missing something, InstallShield Limited Edition doesn't support this.

From a Windows Installer perspective, what you are referring to is called a Secure Custom Public Property. (See: SecureCustomProperties property )

Consider the commandline:

msiexec /i foo.msi SERVERNAME=MyServer

The fact that SERVERNAME is capitalized makes it public. The fact that it's listed in the SecureCustomProperties property would make it Secure. Only secure public properties work when UAC is taken into consideration. If the process is already elevated then it doesn't have to be secure but it really should be.

From the custom action side you'd used [SERVERNAME] to reference the value of the SERVERNAME property.

Then of course you'd likely want to customize the UI experience for when someone just runs the MSI but InstallShield limited edition doesn't support this.

I can think of ways of making it to work using WiX merge modules and/or applying transforms to the built MSI but all of this requires advanced MSI knowledge and it's generally easier to just upgrade to Professional.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top