I have a VBS that runs CreateObject("MSXML2.XMLHTTP").Open "GET"
however, I need to delete the IE11 cache before it runs because the get keeps pulling a cached version of the website that wont expire for 1 minute after the inital get. If I use RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
a dialog is shown that is distracting and takes focus.
myURL = "https://localhost/"
Set ohtmlFile = CreateObject("htmlfile")
Set oXMLHttp = CreateObject("MSXML2.XMLHTTP")
oXMLHttp.Open "GET", myURL , False
oXMLHttp.setRequestHeader "Cache-Control", "no-cache"
oXMLHttp.send
If oXMLHttp.Status = 200 Then
ohtmlFile.Write oXMLHttp.responseText
ohtmlFile.Close
Does not change the file cache, still expires one minute after initial pull.
+++++++++++++++++++++++++++++++++++++++
myURL = "https://localhost/"
Set ohtmlFile = CreateObject("htmlfile")
Set oXMLHttp = CreateObject("WinHttp.WinHttpRequest.5.1")
oXMLHttp.Open "GET", myURL , False
oXMLHttp.setRequestHeader "Cache-Control", "no-cache"
oXMLHttp.send
If oXMLHttp.Status = 200 Then
ohtmlFile.Write oXMLHttp.responseText
ohtmlFile.Close
oXMLHttp.responseText returns nothing
++++++++++++++++++++++++++++++++++++++
CreateObject("WScript.Shell").Run "scripts\exe\PsExec64.exe -accepteula -nobanner -realtime -d RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8", 0, True
CreateObject("WScript.Shell").Run "scripts\exe\PsExec64.exe -accepteula -nobanner -realtime -d RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 264", 0, True
Both still randomly show a popup dialog.