PDA

View Full Version : how to modify a vb script



Ths.Mr
07-27-2005, 08:57 AM
Hi all

I have to alter an vbs file during an installation process by inserting computer name, directory and such. The vb script is used to configure a backup software which is installed later on.

How can I write (replase values) into vbs files??

any advise is welcome :)

regards Thomas

MichaelU
07-27-2005, 10:36 AM
While you can implement arbitrary text processing from InstallScript (or probably from your language of choice), it may well be easier to use, e.g., an INI file to store the values. You could then update your VB script to read the INI, and in the installer use some higher level functions to update the INI. As a bonus if you have to update the VB later, you wouldn't have to worry about preserving the modifications made at install time, as they'd be in a separate file.

Of course an INI file is just one of many potential options; other obvious options include the registry or XML files...

Ths.Mr
07-27-2005, 11:56 AM
Thanks a lot :)

Sounds very good - I will try this out.

Thomas