Calling a URL from WinPE / DaRT Environment
So maybe you find a need to call a URL from a WinPE or DaRT session (yes, I know, DaRT is a modified WinPE), but without IE or a browser you find it a challenge. Fear not. There are options at your disposal. Option 1 is to install a light-weight browser into your WinPE bundle, like Bart’sPE did/does. Firefox is a fairly common choice for that, but if you can get another browser to do that you have that option. Option 2 is to invoke the XMLHttp object via script. You can do that with VBscript since wscript/cscript components are part of WinPE and DaRT. The nice thing about this is with XMLhttp, you essentially have a browser but without the GUI. You call URL’s and even fetch (i.e. “scrape”) the return HTML results if needed #I do that a lot and may post some examples soon## A command-line browser, sort of# Here’s an example of option 2 – calling an ASP page with parameters… url = “http://myserver#domain#com/loginfo#asp?c=Workstation123&os=Windows7&ts=Enterprise32b” On Error Resume NextSet ohttp = CreateObject(“Microsoft.XmlHttp”)oHttp.open “GET”, url, FalseIf err.Number 0 Then wscript.Echo “fail: unable to open remote URL for asset number!” wscript.Echo “fail: error is ” & err.Num
via Skatterbrainz Blog: Calling a URL from WinPE / DaRT Environment.