/build/static/layout/Breadcrumb_cap_w.png

Need help to write vbscript to append values in the ini file

Hi,

I require a vb script to append values to the variable in the ini file.

C:\program files\A.ini

A.ini is having below information.

[ABC]
x=yz
y=ij

I require a script to append "yy" value to "x" variable which is shown like below
[ABC]
x=yz,yy

One more thing.. we dont know how many values will get assigned to "x". But finally we need to append our value during installation of our application.

Can any body helps on this script....

Thanks in advance

Regards,
Sanhivi

0 Comments   [ + ] Show comments

Answers (1)

Posted by: anonymous_9363 13 years ago
Red Belt
0
Lesson One:
- Try to avoid re-inventing the wheel.
Search AppDeploy for 'clsINI'. If you can't find it, you can download the original class pack from JSWare (Google it).
Use the INI class function GetSectionValues or GetINIValue to get the value data.

- Once you have the value string for 'x', you can employ simple string concatenation to create the new data, then call WriteINIValue.
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