View Full Version : How to read an INI setting?

03-22-2004, 04:32 PM
I've tried searching this forum, couldn't quite find the answer to this.

I have a 2-part setup. Part 1 installs all the files, database, and setup.exe for setup 2.

Setup 2 is then run on up to 200 workstations. It needs to read in the INI created with Setup 1, in order to correctly set the INSTALLDIR. (of course, if you know of an easier way to set installdir (it needs to be one directory level higher than where the setup.exe is located) then that would work too)

anyway, i was hoping there was some easy VBS script to read in an INI setting.


03-28-2004, 04:07 PM
Have a looksy at these websites...




Both offer VBScript only solutions, however, please note, it isnt pretty... they are fairly long but complete.


03-29-2004, 02:43 PM
yeah, the code reads in the ini file....
but how to get the value into my INSTALLDIR variable?

03-29-2004, 02:52 PM
You would use some other script that would enter the values into session parameters in the script, something along the lines of...

Session.Property("INSTALLDIR") = strValue

Hope this helps,


03-29-2004, 04:50 PM

yes! thank you, that was the missing piece of very important documentation that I was unable to figure out.

So now, Install 1 writes an INI value of INSTALLDIR to an INI file, and Install 2 just reads in that INI file to set its own Installdir.