1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim WshShell1, SUserProfile
Set WshShell1 = CreateObject("Wscript.Shell")
sUserProfile = WshShell1.ExpandEnvironmentStrings("%USERPROFILE%")
fichier2 = sUserProfile&"\Application Data\ICAClient\PN.INI"
fichier1 = sUserProfile&"\Application Data\ICAClient\APPSRV.INI"
MsgBox "domain :" &domaineold
Dim fso, f, st
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(fichier2, ForReading)
st = f.readAll
f.Close
Set f = fso.OpenTextFile(fichier2, ForWriting)
f.Write (replace(replace(st,"Domain=siege_dev","Domain=NORIAP")))
f.close |
Partager