Script to check if the machine has a valid carepack from HP website

Posted on 2008-11-06
Last Modified: 2012-05-05
Anyone ?
Script to check if the machine has a valid carepack from HP website.
I have found the other script here on  but that one don´t check if customer buys extra carepack
Question by:gasystem
    LVL 4

    Expert Comment

    Do you mean does someone have a VBS that scrapes HP's website or are you asking if HP's site has carepack displayed somewhere?

    Author Comment


    Same as this script  this script checks only standard warranty not status of care pack.

    LVL 4

    Accepted Solution

    Well based on the HTML data the URL you would hit is:

    Changing the above product number to your own and each of the serial numbers to your own as well.   Since no one here would have valid numbers to put in there, it's hard for us to post any code that scrapes the site and gives you the information your looking for.    However, to pull the page data just hit the URL above with the below code to pull what the page looks like.   From there you would just use Instr() to find the data in the text your looking for the Mid() them out so you can do what you want with them.    I wouldn't ever use the Internet Explorer object do get data..   Use MSXML it's faster and cleaner to view.   Below is an example.
    Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") 
    'set timeout for 3 seconds for each type.
    'Resolve, Connect, Send, Receive
    'xmlhttp.setTimeouts 3000, 3000, 3000, 3000   'Uncomment to use
    sURL = 				""
    sURL = sURL & "&country=US"
    sURL = sURL & "&productNumber=123456"
    sURL = sURL & "&serialNumber1=4567989"
    sURL = sURL & "&serialNumber2=4567989"
      "GET", sURL, false
    xmlhttp.send ""
    iStatus = xmlhttp.Status
    If iStatus = 200 Then
    	sData = xmlhttp.responseText
    ElseIf iStatus = 404 Then
    	sData = "File Not Found"
    	sData = "Bad Request"
    End If
    MsgBox sData

    Open in new window


    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Suggested Solutions

    Welcome to part one of a multi-part tutorial series, VBScript for Windows System Administrators.  The goal of this series is to teach non-programmers how to write useful VBS code to automate their environment, and perform tasks faster, and in a more…
    Unlike scripting languages such as C# where a semi-colon is used to indicate the end of a command, Microsoft's VBScript language relies on line breaks to determine when a command begins and ends. As you can imagine, this quickly results in messy cod…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now