Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Set objFSO = CreateObject("Scripting.FileSystemObject")
- If objFSO.FileExists("C:\Program Files (x86)\IBM\Lotus\Notes\notes.ini") Then
- Const ForReading = 1
- Const ForWriting = 2
- Set objFSO = CreateObject("Scripting.FileSystemObject")
- Set objFile = objFSO.OpenTextFile("C:\Program Files (x86)\IBM\Lotus\Notes\notes.ini", ForReading) ' Read the file for "InstallType =2"
- strText = objFile.ReadAll
- objFile.Close
- If InStr(strText, "InstallType=6") Then
- blnFound = True
- If blnFound Then
- End If
- WScript.quit
- else
- strNewText = Replace(strText, "InstallType=2", "InstallType=6")
- Set objFile = objFSO.OpenTextFile("C:\Program Files (x86)\IBM\Lotus\Notes\notes.ini", ForWriting) ' "Writes new InstallType"
- objFile.WriteLine strNewText
- objFile.Close
- End If
- End If
- wscript.quit ' Exits the script
Advertisement
Add Comment
Please, Sign In to add comment