Get Expected "End" error in vb script on last line Char: 8 does anyone
know why?
Thanks!
Glenn
***************************************************************************
Dim wshShell, wshNetwork, OS_Ver, CRLF, oFSO, hoFSO, GroupDict,
CCMINSTPATH
CRLF = Chr(13) & Chr(10) ' use for return and line carriage
Set wshNetwork = WScript.CreateObject("WScript.Network")
Set oFSO = WScript.CreateObject("Scripting.FileSystemObject")
TempPath = wshShell.ExpandEnvironmentStrings("%TEMP%")
UserName = wshShell.ExpandEnvironmentStrings("%USERNAME%")
ComputerName = wshShell.ExpandEnvironmentStrings("%COMPUTERNAME%")
Set WshShell = Wscript.CreateObject("Wscript.Shell")
strMapperSetting = WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{5FF8D3B8-E19A-4B74-A430-A5366CA74B3F}\InstallSource")
if strMapperSetting = "\\ccl_applib\msipackages\mapper\" then
message = "value exists"
If oFSO.FileExists(".\dataexist.010") then
oFSO.DeleteFile(".\dataexist.010")
End if
If Err.Number <> 0 Then ' value does not exists
strMapperSettingExists = 0
Else
strMapperSettingExists = 1
End If
if strMapperSettingExists = 1 then
writelog message
end if
wscript.quit
'===================================================================================
'***************************** Subroutine to write to file
*************************
'===================================================================================
Sub WriteLog (strMessage)
const ForRead = 1
const ForWrite = 2
const ForAppend = 8
LogFile = ".\dataexist.010"
Set fsLog = oFSO.OpenTextFile(LogFile, 8, True)
fsLog.WriteLine (strMessage)
fsLog.Close
end sub