Pass parameters to Install Shield ( MSI ) setup project

12-31-2003, 05:06 PM
I have an InstallScript MSI project and I am trying to pass the command line parameters /z”abc” to setup.exe through the CmdLine entry in the setup.ini. It doesn’t seem to be working. If I do it directly by typing:

setup.exe /z”abc”

Everything works great and CMDLINE is equal to “abc”. However, if I edit the setup.ini to read:

[Startup]
CmdLine=/z”abc”

It doesn’t seem that anything gets into the variable CMDLINE in InstallScript.

Does anyone have any ideas?

mr_anderson
01-02-2004, 03:27 AM
The values specified in the CmdLine get passed to msiexec and not to setup.exe. Thus the command line specified in setup.ini actually gets passed to msiexec's command line as /v"".

Hope this helps.

cindyj
01-12-2004, 04:47 PM
You might be correct that this is how it works. However, IS's documentation says nothing about that. If there is no way to get /z to work from CmdLine in setup.ini then functionality has been lost if you have upgraded from IS Professional. This seems like a bug to me and I hope IS has a work order for it.

http://documentation.installshield.com/robo/bin/robo.dll?tpc=%2frobo%2fprojects%2fhelplibdevstudio9%2fsetupini.htm%3frinolog28301%3dt&mgr=agm&wnd=installshieldlivinghelp%7cmain%20window

CmdLine
Setup reads the command line parameters specified in Setup.ini first, and then appends any command line parameters passed to Setup.exe from the command prompt.

kmoulton
06-29-2004, 02:18 PM
I am using DevStudio 9. I have an InstallScript MSI project.

How do you pass a command line parameter to setup.exe using Setup.ini?

Is it true that "CmdLine=" in Setup.ini only passes this command to msiexec and not to setup.exe?

I realize that I can pass a command line variable to setup.exe using:

setup.exe /z"Whatever".

I would have expected that using CmdLine=/z"Whatever" in setup.ini would have passed this command line variable to setup.exe. However, it does not.

Has this functionality been lost?

Thanks,

--Kim

cindyj
06-29-2004, 02:26 PM
Unfortunately, I have never been able to get this to work and it is my opinion that it is functionality that has been lost. I hope someone at IS will read this and do something about it. PLEASE!!!!

Christopher Painter
06-29-2004, 04:11 PM
Setup /Z and CMDLINE is for InstallScript MSI projects only, not Basic MSI projects.

If you really want to be able to pass data to MSI from the setup.ini then I suggest you just declare a public MSI property and pass the data with a setup /v"PROP=DATA"

For example public MSI property PROP

setup /v"PROP=DATA"

or setup.exe with setup.ini

[Startup]
CmdLine=TEST=OOPS

You have to remember MSI is not InstallShield Professional. Natively MSI only knows what an MSI file is and its processed by msiexec. Setup.exe is just a wrapper EXE that tries to bring the files along and transfer control to MSIEXEC. Basic MSI doesn't understand what CMDLINE is or what /Z is, only InstallScript projects do. Personally I avoid InstallScript projects because they are a combination of the worst of pure IShield Pro and MSI.

cindyj
06-29-2004, 05:03 PM
As both Kim and I clearly state we are using InstallScript MSI projects, not everyone wants to use a Basic MSI. If you are wondering why this post is in the Windows Installer projects section and not in the InstallScript projects section, maybe it should be in the other section, but InstallScript MSI projects are neither just one nor the other, so they have ended up in both sections from what I can tell.

Your suggestion sounds like a good work around, but this is still lost functionality. DevStudio was advertised as bring InstallShield Professional and InstallShield Developer together into one software package. Setup.exe is a wrapper but it is from InstallShield so they should be able to fix this issue. If you are using an InstallScript or an InstallScript MSI project you still should be able to get information to CMDLINE via the setup.ini. Just because MSI is being used as the engine to install your files, it shouldn’t have any impact on this issue.

Personally, for very complex installs I find InstallScript MSI projects much friendlier to work with. I find Basic MSI’s, just that basic.

Christopher Painter
06-29-2004, 07:56 PM
Originally posted by cindyj
As both Kim and I clearly state we are using InstallScript MSI projects, not everyone wants to use a Basic MSI. If you are wondering why this post is in the Windows Installer projects section and not in the InstallScript projects section, maybe it should be in the other section, but InstallScript MSI projects are neither just one nor the other, so they have ended up in both sections from what I can tell.


They used to have 3 seperate forums, Professional , BasicMSI and InstallScript MSI. Now they only have Professional and WindowsInstaller with no distinction made for InstallScript MSI projects. Sorry I didn't realize you were doing an InstallScript MSI based on your posts.

Personally, for very complex installs I find InstallScript MSI projects much friendlier to work with. I find Basic MSI’s, just that basic.

Many of us find InstallScript MSI projects are just a hacked up combination of MSI and Professional technology.

0 nhận xét:

 

Coding experience share Copyright © 2010 | Designed by Ipietoon for Free Blogger Template