Hi everyone,

Let's say that I have a .msi setup file already (created with InstallAware) and I use some variables in it.
I was wondering if there is a way to set these variables in an INI file and pass the INI file to the .msi setup file through the command line?

Thanks in advance!

Momchil Ivanov.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
There's no native way to do that but it could be done in script. My forté is VB Script so would naturally suggest that but it *may* be possible to do it in WiseScript or InstallScript, if you're using either Wise or InstallShield. Members who are proficient in that area may be able to guide you on that.

If you go the VB Script route, there is no native way to handle INI files but there's a good INI class file knocking around the web that you can use.
Answered 01/23/2008 by: VBScab
Red Belt

Please log in to comment
0
ORIGINAL: decimator
Let's say that I have a .msi setup file already (created with InstallAware) and I use some variables in it.
I was wondering if there is a way to set these variables in an INI file and pass the INI file to the .msi setup file through the command line?


Momchil, if by variables you mean properties, and you want to read the INI file with the MSI you can do this but you have to first place the INI in the Windows folder. At least the last time I tried it this was true, with Windows Installer 2.0
So it is possible to do, you'll just have to stage the INI file in your Windows folder before running the MSI.
Answered 01/23/2008 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
0
So it is possible to do, you'll just have to stage the INI file in your Windows folder before running the MSI.Owen, I think one of us has misunderstood the requirement. I read the requirement as wanting to have various settings FOR THE INSTALLATION COMMAND LINE to be set in the INI.

Thinking about THAT, I've had a re-think. If you want to pass properties to the command line from a file, I think you couldprobably do it by simple DOS piping. That is, have your properties and other command-line switches in a text file (called, say, COMMAND.TXT) like this:
REBOOT=R ALLUSERS=2 WHATEVER=FALSE /QB /L*V %TEMP%\Product_Name.LOG

and then pipe that file into the call to MSIExec:

MSIExec /I [path_to_and_name_of_MSI] < COMMAND.TXT
Answered 01/24/2008 by: VBScab
Red Belt

Please log in to comment
0
That's pretty creative :-)

I guess we'll know when and if Momchil responds, whether or not we've been able to help him, and what exactly his requirement is!

OG
Answered 01/24/2008 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
0
Also note that you can only set Public (ALL CAPS) properties from the command line. You could also create a custom action to read in your ini file during installation.
Answered 01/24/2008 by: xythex
Orange Senior Belt

Please log in to comment
0
ORIGINAL: aogilmor
That's pretty creative :-)

We try. :) Actually, thinking further, the WHOLE string of arguments, including the path to and name of the MSI, could be contained in the text file, couldn't it?
Answered 01/25/2008 by: VBScab
Red Belt

Please log in to comment
0
Hi folks,
isn't that exactly one of the main purpose of a transform?
Regards, Nick
Answered 01/25/2008 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
Hello

i had the almost the same problem.

the "real" way to do it is transforms, that is correct. But my user did not know how to create transforms.

so i created vbscript that reads a ini file from the sourcedir os the MSI.

i have posted the solution on my blog.

http://blog.coretech.dk/section/scripting/vbscript-scripting/automated-windows-installer-properties-from-ini-embedded-vbscript/

I hope it helps!

Best Regards

Jakob Gottlieb svendsen
Answered 10/08/2008 by: JakobSvendsen
Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity