This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Accepting Command line parameters with Basic MSI Project
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 03, 2012
12:10 PM
Accepting Command line parameters with Basic MSI Project
How do you set up a Basic MSI project to accept command line variables? Can I have it populate the property manager with the values passed in with the command line?
I have several Basic MSI projects that I am building and want them to accept command line values. I am using the Basic MSI projects to build exe/msi files to be used in a suite project. Building my custom dialogs in the suite project to get settings from the user and passing them to the exe/msi files. I just don't know how to get the exe/msi files to know what to do with them once they are passed in.
I have several Basic MSI projects that I am building and want them to accept command line values. I am using the Basic MSI projects to build exe/msi files to be used in a suite project. Building my custom dialogs in the suite project to get settings from the user and passing them to the exe/msi files. I just don't know how to get the exe/msi files to know what to do with them once they are passed in.
(10) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 03, 2012
01:07 PM
Use the MSI command line builder. Its under tools in installshield. Its very helpful.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 03, 2012
01:36 PM
I thought the command line builder just built the output command line string
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 07, 2012
08:20 AM
BobVilla wrote:
How do you set up a Basic MSI project to accept command line variables? Can I have it populate the property manager with the values passed in with the command line?
I have several Basic MSI projects that I am building and want them to accept command line values. I am using the Basic MSI projects to build exe/msi files to be used in a suite project. Building my custom dialogs in the suite project to get settings from the user and passing them to the exe/msi files. I just don't know how to get the exe/msi files to know what to do with them once they are passed in.
If you have a property in a suite then you can pass it to msi using MSI (Silent) Command Line.
Let's say you have a text box in wizards with propery XYZ to pass it to msi you add to Packages/Operation/Install Command Line: XYZ="[XYZ]"
The first part is a property in MSI and quoted is the value from text box in suite.
In MSI it could be whatever like username for a service, a condition whether to fire a CA, etc.
Hope it makes sense
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 07, 2012
11:40 AM
I understand passing from the suite project to the Basic (exe or msi). I guess what I am missing is what do I have to do to make the basic(project) realize that there is a value coming through the command line and what to do with it.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 08, 2012
03:01 AM
BobVilla wrote:
I understand passing from the suite project to the Basic (exe or msi). I guess what I am missing is what do I have to do to make the basic(project) realize that there is a value coming through the command line and what to do with it.
I'm going to give you a very simple example.
Make a checkbox in suite wizard and set property field to DONTINSTALL, assign for the package Install MSI command lines DONTINSTALL="[DONTINSTALL]"
On basic msi at General Information in Install Condition add a condition:
Condition: DONTINSTALL<>"true"
Message: Something
What this will do is if you tick the checkbox in suite during install the MSI will not install.
This way you can pass on properties and catch them in MSI projects.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 09, 2012
08:35 AM
So, you don't have to set up some kind of container in the Basic project to handle the incoming variables in the command line. Just use the variable name that is passed in and the EXE file will just recognize it?
What I am doing is building Basic MSI projects, exporting them as MSI/EXE files, and building a Suite project to point to the individual Basic installs. For some reason none of the custom dialogs from my Basic projects are displaying when the Suite project runs them ( even though if I run them outside of the Suite project they do show up ). So, I am re-building the custom dialogs in the Suite project and passing the variables from the Suite dialogs into the Basic project in place of the dialogs in the Basic project.
So, I can use the command line variable in the condition statements. Can I put them in the Property Manager? Example: Create a new property called CHECKINSTALL, and in the Value column put {DONTINSTALL} ?
What I am doing is building Basic MSI projects, exporting them as MSI/EXE files, and building a Suite project to point to the individual Basic installs. For some reason none of the custom dialogs from my Basic projects are displaying when the Suite project runs them ( even though if I run them outside of the Suite project they do show up ). So, I am re-building the custom dialogs in the Suite project and passing the variables from the Suite dialogs into the Basic project in place of the dialogs in the Basic project.
So, I can use the command line variable in the condition statements. Can I put them in the Property Manager? Example: Create a new property called CHECKINSTALL, and in the Value column put {DONTINSTALL} ?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 09, 2012
08:47 AM
BobVilla wrote:
So, you don't have to set up some kind of container in the Basic project to handle the incoming variables in the command line. Just use the variable name that is passed in and the EXE file will just recognize it?
No you don't have setup any container, the MSI will just recognize the property, i.e. if the property is somewhere in MSI, like in my example a condition.
What I am doing is building Basic MSI projects, exporting them as MSI/EXE files, and building a Suite project to point to the individual Basic installs. For some reason none of the custom dialogs from my Basic projects are displaying when the Suite project runs them ( even though if I run them outside of the Suite project they do show up ). So, I am re-building the custom dialogs in the Suite project and passing the variables from the Suite dialogs into the Basic project in place of the dialogs in the Basic project.
The MSI dialogs will never be visible when ran through Suite, since suite basically silent installs the packages, that's why you need to specify MSI Silent Command Line
So, I can use the command line variable in the condition statements. Can I put them in the Property Manager? Example: Create a new property called CHECKINSTALL, and in the Value column put {DONTINSTALL} ?
I'm not sure about this one, i don't know if you can put variable properties in properties manager since I personally use property manager to give a property a specific value not variable, instead i use the variable in custom actions, dialogs, IIS configs, etc. in [PROPERTY] format.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 09, 2012
08:58 AM
These variables that are passed from my Suite install to my Basic project are really just pass again as command line variables to another DLL in my Basic project. The command line(for the Basic project DLL) references the Property Manger values.
Can I just put the DONTINSTALL in the second command line?
Can I just put the DONTINSTALL in the second command line?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 09, 2012
09:06 AM
BobVilla wrote:
These variables that are passed from my Suite install to my Basic project are really just pass again as command line variables to another DLL in my Basic project. The command line(for the Basic project DLL) references the Property Manger values.
The property manager really just manages values for properties, if your DLL refers to a property named XYZ in property manager, have a property in Suite called XYZ and have it in silent command line XYZ="[XYZ]" it will be exactly the same as if you put it in property manager.
Can I just put the DONTINSTALL in the second command line?
I don't understand what you mean with second command line?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 09, 2012
09:29 AM
The first answer, answered the second one. I have a command line going from the suite project to the Basic project. Then I have a "second" command line passing the values from the Basic project to the Components through the .NET Installer Class Arguments. That was what I was calling the "second" command line. I think this will work... thanks so much!