/build/static/layout/Breadcrumb_cap_w.png

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)

Posted by: JakobSvendsen 16 years ago
Yellow Belt
2
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
Posted by: AngelD 17 years ago
Red Belt
0
You don't need a vbscript to do this, appsearch will handle this for you.
Search for "Searching for Existing Applications, Files, Registry Entries or .ini File Entries" in the MSI.CHM?
Posted by: karan_gupta 17 years ago
Orange Belt
0
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 .
Posted by: spartacus 17 years ago
Black Belt
0
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
Posted by: aogilmor 17 years ago
9th Degree Black Belt
0
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
9th Degree Black Belt
0
Jakob, great idea. we had a case once where an ini file made sense, but the inisearch in windows installer only looks in the windows directory. so this would have been useful. as it was, we copied the ini to \windows with a shell script. kinda kludgy. [;)]
Posted by: JakobSvendsen 16 years ago
Yellow Belt
0
thank you.

ah, i did not think about doing it the other way, as you did.

could be useful, if you only need info frmo a specific section in the ini.
my script is does not looka t section name, i could extended to do so though, if needed

have a nice day.
Posted by: anonymous_9363 16 years ago
Red Belt
0
ORIGINAL: JakobSvendsen
my script is does not looka t section name, i could extended to do so though, if needed
No need. Download the INI class (amongst others) from JSWare http://www.jsware.net. It has everything anyone might need for handling INIs in script.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
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