/build/static/layout/Breadcrumb_cap_w.png

using variable values from INI file in MSI setup

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

Answers (8)

Posted by: anonymous_9363 16 years ago
Red Belt
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.
Posted by: aogilmor 16 years ago
9th Degree Black Belt
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.
Posted by: anonymous_9363 16 years ago
Red Belt
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
Posted by: aogilmor 16 years ago
9th Degree Black Belt
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
Posted by: xythex 16 years ago
Orange Senior Belt
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.
Posted by: anonymous_9363 16 years ago
Red Belt
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?
Posted by: nheim 16 years ago
10th Degree Black Belt
0
Hi folks,
isn't that exactly one of the main purpose of a transform?
Regards, Nick
Posted by: JakobSvendsen 15 years ago
Yellow Belt
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ