According to Scripting Guy ()
SyncMode5 can be set to one of the four possible values :
Every visit to the page 3
Every time you start Internet Explorer 2
Automatically 4
Never 0
I've tried all values, but none of them work. Here is my code :
Code:
Break On
GetPage("http://10.10.10.1/kix/kix64.dll?Login") ?
Sleep 10
Function GetPage($URL)
Dim $HTML, $IECacheKey, $IECacheVal
$IECacheKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
$IECacheVal = ReadValue($IECacheKey, "SyncMode5")
$IECacheVal ?
If $IECacheVal <> 3
$nul = WriteValue($IECacheKey, "SyncMode5", "3", "REG_DWORD")
EndIf
$HTML = CreateObject("microsoft.XMLhttp")
$HTML.Open("GET", $URL, Not 1)
$HTML.Send
If $HTML.Status = 200
$GetPage = $HTML.ResponseText ;or ResponseBody
Else
$GetPage = "HTTP Status Code: " + $HTML.Status + " (" + $HTML.StatusText + ")"
Exit 1
EndIf
$nul = WriteValue($IECacheKey, "SyncMode5", $IECacheVal, "REG_DWORD")
EndFunction