June 22, 200521 yr 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
June 22, 200521 yr 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=
June 22, 200521 yr Author 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.
June 22, 200521 yr object.CopyFile ( source, destination[, overwrite] ) ex.fso.CopyFile "c:\mydir\new.ini", "c:\mydir\old.ini\",TRUE
Create an account or sign in to comment