What happens is that, on a deferred custom action you can't use exernal properties such as those supplied from the command line , you can only access internal ones such as CustomActionData.
The trick here is that, if a property with the action's name exists RunMyExe in the example above , the internal CustomActionData property get its value from it.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Pass command line arguments from installshield installer to custom action exe Ask Question. Asked 5 years, 9 months ago. Active 5 years, 9 months ago. Viewed 2k times. Improve this question. Shahzad Shahzad 1, 1 1 gold badge 12 12 silver badges 23 23 bronze badges.
Add a comment. Active Oldest Votes. What you should do is this: In your installer, define some custom MSI properties which you need for the. The Property Name should be the name of your custom action which runs the exe e. But the user has no control over the custom action. So they have to be passed to the installer. And the installer has to pass them to the custom actions.
One of the ways is to pass values as command line parameters while invoking the installer. But when InstallShield is used, the command line parameters have to be passed to the InstallShield installer exe file. This in turn would pass the values to the MSI installer, which in turn would pass those to the custom action. The real problem is how to configure these 3 levels to pass and consume these parameters. Below is a step by step account of how to achieve this.
You first need to pass the values to the InstallShield setup. The value can be passed as below:. So the entire literal value will be passed to the MSI installer as is. Special care should be taken while naming parameters. The names of parameters should be capitalized, so that they are considered as public properties. Otherwise they would be ignored if the user does not have sufficient permissions.
Alternatively, if you are using MSI package for installation, passing values are simpler. Now you need to create a custom action and set it up to receive the parameters you require. Use this option when debugging a DLL function that is called from your setup script. This option specifies that Setup. Specifies the amount of time in seconds by which initialization of the setup is delayed after Setup.
When using long path and filename expressions with switches, enclose the expressions in double quotation marks. The enclosing double quotes tell the operating system that spaces within the quotation marks are not to be treated as command line delimiters. User-defined command line switches. Along with the command line switches listed above, -f and -zi are command line switches reserved by InstallShield.
User redefinition of these command line switches, either upper- or lowercase, can cause errors. Like predefined command line switches, you can pass these arguments directly to Setup. Note: Setup. This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies. Summary This article provides information on each command-line parameter that can be passed to a InstallScript 'setup.
Synopsis This article provides information on each command-line parameter that can be passed to a InstallScript 'setup.
0コメント