Oct 3 2008 3:00PM GMT
Posted by: Jerry Lees
HTTP,
HTML,
XML,
VBScript,
VBScript Objects,
Microsoft.XmlHttp,
Web Pages
Recently, I had a situation where I had to pull down a HTML page to compare it to a known copy of the page. Certainly, IE or FireFox– or Google’s Chrome would have done the trick and I could have viewed the source. But that would require me to do work every time we needed to check the page against the known good source.
Instead I wrote a script to pull the HTML source and echo the response to the console (or a messag box if you are not using cscript to execute the script). While not a full blown HTTP QA script it does do the job of getting the HTTP responses from the server and is certainly a core part of any QA script anyone would write.
Basically the script uses the Microsoft.XMLHTTP object to preform all the HTTP calls and retrieve the HTML page. It sounds scary, but if you look at the script below I think you’ll find that it really is quite easy to accomplish. So, here is the script’s code:
URL=”http://www.gamersigs.net/“
Set WshShell = WScript.CreateObject(”WScript.Shell”)
Set http = CreateObject(”Microsoft.XmlHttp”)
On Error Resume Next
http.open “GET”, URL, False
http.send “”
if err.Number = 0 Then
WScript.Echo http.responseText
Else
Wscript.Echo “error ” & Err.Number & “: ” & Err.Description
End If
set WshShell = Nothing
Set http = Nothing
Enjoy!
Jul 18 2008 3:46PM GMT
Posted by: Jerry Lees
Networking,
routers,
Documentation,
Development,
Developer documentation,
Exchange,
web sites,
online books,
online resources
I like free stuff. Who doesn’t? And with the price of technology books you can imagine I was amazed when I found a pretty cool site recently, Scribd, that allows you to upload electronic documents. They then add this document to the database they have and make it search-able. Plus, you can search the database for specific subjects or words.
Not only are regular people uploading books and documents, but there are publisher’s uploading books. Sometimes they are just excerpts, but sometimes they are entire books as well like:
ASP Programming for the Absolute Beginner
Beginning ASP NET 3 5 in C Sharp 2008 From Novice to Professional
MSPress Exam 70-284 Implementing and managing Exchange server 2003
There’s even a CCIE Study Guide and my personal favorite the VBScript Complete Reference !
And Many Many more… so stroll on over there and see what you can find!
Enjoy!
Mar 7 2008 10:22PM GMT
Posted by: Jerry Lees
Networking,
Security,
DataCenter,
Exchange,
Administration tools
While not VBScript related, I found this Microsoft Eventlog and Error Message Search a few days ago as I stumbled around looking for tools that I thought network administrators would need on my site that I’ve been toying with– I had to share the tool with you as well!
The tool itself is an awesome resource, similar to EventID.net– except it’s FREE and it comes from Microsoft themselves providing links to Microosft content about the event entry or error message.
You can search for any combination of the following:
Microsoft Product|
Version
Message ID
Event Source
File Name
Language
When you do it takes you to a search result page that lists the available results for your specific search, each seem to have not only an example of the message, but also an explanation of what the event means…. and the best part a section entitled User Action that gives a possible solution for the problem!
Enjoy the tip!