cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mournblade
Level 3

passing a custom parameter to msi?

Hi

I am new to InstallShield and would like to know if the following is possible?

Is it possible to create a custom parameter that could be passed in from the command line at install time (basic msi) to perform either custom action A or custom action B, where A is write value to registry ad B is write different value to registry?

Many thanks
Labels (1)
0 Kudos
(10) Replies
Ajay_Ladsaria
Level 7

It is very possible to do what you describe. It is possible to set public properties (properties whose name is in all capital letters) on the command line to msiexec.exe (if directly running from MSI) or setup.exe.

For example:
msiexec /i MYPROP1="my value" MYPROP2=test

OR

setup.exe /v"MYPROP1=\"my value\" MYPROP2=test"

Now all you need to do is condition your custom actions based on public properties, and you are all set.
0 Kudos
TsungH
Level 12

It is possible. From command line, you can specify property/value pair, and check value of the property in custom action condition.

However, you will need custom actions for uninstall and rollback (both install and uninstall). Would it be possible to take advantage of conditional component instead?
0 Kudos
sandeep_madhu14
Level 6

There is a tool to edit msi package in microsoft utilities called "ORCA".

Through which you can pass the parameters and you can acheive any thing through that tool.

you can search in google for that tool.


thanks
madhu
0 Kudos
TsungH
Level 12

I am a little confused. Can you explain how you can pass parameters to setup.exe or .msi file through orca.exe?
sandeep.madhu14 wrote:
Through which you can pass the parameters and you can acheive any thing through that tool.
0 Kudos
mournblade
Level 3

Hi All

Many thanks for your responses, much appreciated!
0 Kudos
sandeep_madhu14
Level 6

Check following information i think it may help you.....

Properties
All public properties can be set or modified from the command line. Public properties are distinguished from private properties by the fact that they are in all capital letters. For example, COMPANYNAME is a public property.

To set a property from the command line, use the following syntax: PROPERTY=VALUE. If you wanted to change the value of COMPANYNAME, you would enter:

msiexec /i "C:\InstallShield 2009 Projects\Othello\Trial Version\Release\DiskImages\Disk1\Othello.msi" COMPANYNAME="Acresso"
0 Kudos
danwize
Level 4

sandeep.madhu14 wrote:

Properties
All public properties can be set or modified from the command line. Public properties are distinguished from private properties by the fact that they are in all capital letters. For example, COMPANYNAME is a public property.


I have a public property called WILLREMOVEROLLBACKS in my basic installshield projet. I also have a check box called REMOVEROLLBACKBOX. The checkbox is selected by default and the property of that check box is WILLREMOVEROLLBACKS. If WILLREOMVEROLLBACKS is true, then the rollbacks folder is deleted by VBScript during the uninstall of my product. During a silent install, how do I set WILLREMOVEROLLBACKS to false, in case the user does not want to remove the rollback data? I pass the parameter, but it seems that my command is being ignored. Any ideas?

This is the command line I am using:
msiexec /x JVDI.msi /qn WILLREMOVEROLLBACKS=False
I also tried:
msiexec /x JVDI.msi /qn WILLREMOVEROLLBACKS=0
0 Kudos
TsungH
Level 12

To know for sure what happens during installation/uninstallation, you can generate a verbose log.
danwize wrote:
but it seems that my command is being ignored. Any ideas?
According to CheckBox Control, "unselected state sets the property to null."
danwize wrote:
This is the command line I am using:
msiexec /x JVDI.msi /qn WILLREMOVEROLLBACKS=False
I also tried:
msiexec /x JVDI.msi /qn WILLREMOVEROLLBACKS=0
0 Kudos
danwize
Level 4

So I'll have to do something like:
msiexec /x JVDI.msi /qn WILLREMOVEROLLBACKS=null

I tried this, but it still didn't work. How do I pass a null value?
0 Kudos
danwize
Level 4

danwize wrote:
So I'll have to do something like:
msiexec /x JVDI.msi /qn WILLREMOVEROLLBACKS=null

I tried this, but it still didn't work. How do I pass a null value?


Oh, NM. Just do this:

msiexec /x JVDI.msi /qn WILLREMOVEROLLBACKS=""
0 Kudos