craziscoth Posted June 22, 2005 Posted June 22, 2005 Hey,I am new to VBScript and need a function to find a specified key in an ini file and update the value. I was looking for something similar to the WritePrivateProfileString which I know how to use in C++ or VB but can't seem to get to work in VBScript. Anyone know how to get it to work with VBScript or just how to update the key value in an ini file once you find it? Thanks
dman Posted June 22, 2005 Posted June 22, 2005 check this thread. you should be able to mod this vbs to find and change any value...http://www.msfn.org/board/index.php?showtopic=48322&hl=
craziscoth Posted June 22, 2005 Author Posted June 22, 2005 That loooks like it would work, but then I have to rename the new file overwriting the old file. Is that really the best way to update an existing file? Is there an easy way to rename the new file and overwrite the old file?Thanks.
dman Posted June 22, 2005 Posted June 22, 2005 object.CopyFile ( source, destination[, overwrite] ) ex.fso.CopyFile "c:\mydir\new.ini", "c:\mydir\old.ini\",TRUE
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now