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
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)
Please log in to answer
Posted by:
anonymous_9363
13 years ago
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.
- 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.
so that the conversation will remain readable.