VBScript to read ini values and pass it to MSI
Hi , Can anyone explain me how can i make use of a vbscript ti read the parameters from an ini file and pass it to an ini file . I want to make it this way coz i dont want the end user to mess up with msi .
0 Comments
[ + ] Show comments
Answers (8)
Please log in to answer
Posted by:
JakobSvendsen
16 years ago
Hello
I know this is an old post, but i ran into same problem.
My customer needed to be able to edit his own ini file, which was next to the msi file.
My script reads ini values into properties in the msi, so you can fill your "internal" ini with the property values.
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
MCT / MCTS / VB.NET / VBScript / Powershell / MSI
I know this is an old post, but i ran into same problem.
My customer needed to be able to edit his own ini file, which was next to the msi file.
My script reads ini values into properties in the msi, so you can fill your "internal" ini with the property values.
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
MCT / MCTS / VB.NET / VBScript / Powershell / MSI
Posted by:
AngelD
17 years ago
Posted by:
karan_gupta
17 years ago
Hi Angel ,
Sorry i was not able to frame the query properly . Actually what i want is a msi file and an ini file . The msi on running will read parameters from the ini file and based on that it will do the installaion . This way the user can make changes in the ini file and no need of modifying the msi would be there .
Sorry i was not able to frame the query properly . Actually what i want is a msi file and an ini file . The msi on running will read parameters from the ini file and based on that it will do the installaion . This way the user can make changes in the ini file and no need of modifying the msi would be there .
Posted by:
spartacus
17 years ago
Surely a better approach would be to use transforms and/or public properties on the command line to do this.
A lot depends on whether your installation requirements vary for whole categories of users, or whether the requirements vary for individual users.
If you identify that there are categories of users (with common requirements within the category), you could create a transform for each category and use that instead.
If however you have parameters that vary and are specific to each individual user, you could pass these as public properties on the msiexec command line and use the properties within your MSI. For example, IniFile table entries can reference the public properties you supply on the command line and you can condition features and/or components based on the properties supplied.
Regards,
Spartacus
A lot depends on whether your installation requirements vary for whole categories of users, or whether the requirements vary for individual users.
If you identify that there are categories of users (with common requirements within the category), you could create a transform for each category and use that instead.
If however you have parameters that vary and are specific to each individual user, you could pass these as public properties on the msiexec command line and use the properties within your MSI. For example, IniFile table entries can reference the public properties you supply on the command line and you can condition features and/or components based on the properties supplied.
Regards,
Spartacus
Posted by:
aogilmor
17 years ago
You can not just use any INI for the MSI to read from. If you're going to to use AppSearch on the INI file, the .ini file must be present in the default Microsoft Windows directory. Thus, if you're going to supply your own INI file you'll have to find a way to get it into the Windows directory BEFORE starting the install actions.
Posted by:
aogilmor
16 years ago
Posted by:
JakobSvendsen
16 years ago
Posted by:
anonymous_9363
16 years ago
ORIGINAL: JakobSvendsenNo need. Download the INI class (amongst others) from JSWare http://www.jsware.net. It has everything anyone might need for handling INIs in script.
my script is does not looka t section name, i could extended to do so though, if needed
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.