mac_shinobi Posted February 24, 2012 Posted February 24, 2012 Hi @Steve21 @Arthur Just a query with regards to wanting to know if there was a way to create preferably a hta that could connect to and interact with both the Lenovo and Dell servers. 1. Open HTA it querries and obtains all the machine information to include ( Computer name, service tag / serial number , asset tag and Model number ( for Lenovo machines ) and basic machine spec ie OS + Service Pack Level, CPU, RAM , HDD 2. HTA then communicates with the relevant site / server or whatever with the relevant information so for Dell this would just be the service tag and for Lenovo this would be the model ie 4236CP7 and the serial number afaik. 3. HTA receives all the warranty info ie shipped date, start date and end date of the warranty for the machine that the HTA has or had run on. I did find this : Dell Warranty Info - Hardware Inventory extension - Sherry Kissinger at myITforum.com Not had a chance to look into this fully yet but just wanted thoughts / suggestions on how to go about this, step 1 I can do myself but steps 2 and 3 is where I need help
Steve21 Posted February 24, 2012 Posted February 24, 2012 Easiest way would be as such: strServiceTag = "ABCDEF" url = "http://supportapj.dell.com/support/topics/topic.aspx/ap/shared/support/my_systems_info/en/details?c=in&cs=inbsd1&l=en&s=bsd&ServiceTag=" & strServiceTag & "&~tab=1" Set writyObject = CreateObject("Scripting.FileSystemObject") Set WrityStuff = writyObject.OpenTextFile("MyWarrantyStuff.txt", 8, True) WrityStuff.WriteLine(urlget(url)) WrityStuff.Close Function URLGet(URL) Set Http = CreateObject("MSXML2.ServerXMLHTTP.6.0") Http.Open "GET",URL,false Http.Send URLGet = Http.responseText End Function Instead of writing it to text file, You'd just put it into a variable, then read through it and rip what information you want. e.g MyWarranty = urlget(url) Can't test much past what I did above at work, as I can't get direct access through VTMG on this box. Hope above gives a bit of help? Steve 1
mac_shinobi Posted February 24, 2012 Author Posted February 24, 2012 Can't upload a screen grab of the error but am getting : Line 12, Char 3 Error : The operation timed out Code : 80072EE2 Source : msxml6.dll Any ideas ? Windows 7 32 bit enterprise edition.
Arthur Posted February 24, 2012 Posted February 24, 2012 I know it's not a VBScript, but would this PowerShell function be any good? When you run it, all of the warranty details are returned as separate objects. This would enable you to output the info to a CSV file (in different columns) for example, or if you have the ISE installed, Out-GridView. Can't upload a screen grab of the error but am getting Btw, CTRL + C will copy the text from the error message dialog box.
mac_shinobi Posted February 24, 2012 Author Posted February 24, 2012 I know it's not a VBScript, but would this PowerShell function be any good? When you run it, all of the warranty details are returned as separate objects. This would enable you to output the info to a CSV file (in different columns) for example, or if you have the ISE installed, Out-GridView. Btw, CTRL + C will copy the text from the error message dialog box. I can run hta / vbscripts on my work machine but the department who deal with group policies etc have locked down the use of powershell so can't run or do much with powershell at work sigh
mac_shinobi Posted February 24, 2012 Author Posted February 24, 2012 That's not nice. That's what I thought but I used stronger / possibly harsher language
Steve21 Posted February 24, 2012 Posted February 24, 2012 Can't upload a screen grab of the error but am getting : Line 12, Char 3 Error : The operation timed out Code : 80072EE2 Source : msxml6.dll Any ideas ? Windows 7 32 bit enterprise edition. Could try increasing the time-out on it, but I'd say it's likely something is blocking it as it should be defaulted to 4~ seconds anyway. Try adding Http.setTimeouts 5000, 60000, 10000, 10000 after the "Set" line. Steve
mac_shinobi Posted February 24, 2012 Author Posted February 24, 2012 (edited) Could try increasing the time-out on it, but I'd say it's likely something is blocking it as it should be defaulted to 4~ seconds anyway. Try adding Http.setTimeouts 5000, 60000, 10000, 10000 after the "Set" line. Steve never mind will give that a go, took me a little while to realise you meant this line Set Http = CreateObject("MSXML2.ServerXMLHTTP.6.0") edit - nope still getting the same error message. Something relating to the msxml6.dll ? Does that file even exist on windows 7 or do I need to install something or register that dll ?? tried all 3 proxy servers I have access to , left the script to include the extra timeout, done a search on the C: drive and cant find any msxml6.dll file ( including the search of hidden files and directories ) Not sure where to download or what to download to install the dll file unless there is another way of doing this without that dll ? Edited February 24, 2012 by mac_shinobi
Steve21 Posted February 24, 2012 Posted February 24, 2012 It's part of Microsofts main MXL parser, should have it if you've got all updates. Can try to do it without dll if you prefer Steve
mac_shinobi Posted February 24, 2012 Author Posted February 24, 2012 (edited) It's part of Microsofts main MXL parser, should have it if you've got all updates. Can try to do it without dll if you prefer Steve without would be easier if poss as am struggling to make this work. I did find this : http://stackoverflow.com/questions/7445316/execute-function-from-start-on-error-timeout-through-vb-script-in-classic-asp More with regards to Http.Open [color=#800000]"GET"[/color], url, [color=#800000]False[/color], PROXY_USERNAME, PROXY_PASSWORDBut attempted to use my own windows logon credentials and it still gave me the time out error. Edited February 24, 2012 by mac_shinobi
Arthur Posted February 24, 2012 Posted February 24, 2012 Does that file even exist on Windows 7 It comes with Windows. 1
mac_shinobi Posted February 24, 2012 Author Posted February 24, 2012 It comes with Windows. Let's just say it should by default but the image that was created had .Net Framework missing so wouldn't surprise me if that xml file was missing too.
mac_shinobi Posted February 27, 2012 Author Posted February 27, 2012 @Steve21 - any update on this yet ?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now