cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Corbett
Engaged Sweeper
FYI: Lansweeper 5.0 which is currently in beta will have this feature build-in for Dell, HP, Lenovo


This isn't exactly a "custom action" but this topic seems the best. I wrote an application that when executed it will update the Purchase Date and Warranty Date custom fields of all Dell computers in the LS database. It accomplishes this by making an HTTP request to Dell's support site and pulling down the appropriate dates. Some assumptions are made here: The oldest date found on the support page is the purchase date and the most recent date found on the page is the warranty expiration date.

EDIT (3/21/2012): Dell changed their support site which broke the program. The program now uses the web service that Dell provides for getting warranty information. Due to this change a new line needs to be added to the .config file:

<add key="DellWarrantyURL" value="http://xserv.dell.com/services/assetservice.asmx"/>


This is a .NET application and therefore requires Framework 3.5.

Before running the program be sure to edit the .config file and set the connectionString option with the appropriate SQL Server computer name, database name, username and password.

In my situation I used the Task Scheduler to run this application once a week (UpdateDellWarrantyInfo -all) to make sure all computers have the most recent warranty information and once a day
(UpdateDellWarrantyInfo -warrantyInfo) to get the warranty information for new computers.

12/21/2009, 4:15PM ET - Added most recent version of utility.
12/24/2009, 10:50AM ET - Attached most recent version (v1.4) of utility and updated the documentation.
01/04/2010, 1:30PM ET - Fixed bug where invalid Asset Tags (AAAAAA5 for example) would throw an exception. It now just skips it and keeps going. Attached v1.5.
01/13/2010, 10:07AM ET - Added a proxy authentication mechanism (integrated authentication only), fixed a SQL statement that failed on SQL 2000, added -verbose option for troubleshooting (rewrote argument handling routines), added stack trace to error output for additional troubleshooting. Attached v1.6.
01/18/2010, 8:16AM ET - Rewrote date handling routine to better handle different date formats. Attached v1.7.
07/02/2010, 12:16PM ET - I haven't had much time to maintain this lately. Attached v1.7 of the source.
03/21/2012, 8:26AM ET - Rewrote the warranty fetch routine to use the Dell web service. Note this version now requires a DellWarrantyURL key in the .config file. Attached v2.0.

Usage: UpdateDellWarrantyInfo [options] [-verbose]

Options

-all
Will update the warranty information for all Dell computers in the Lansweeper
database.

-warrantyInfo
Will update the warranty information only for the Dell computers that have
empty warranty and purchase dates in the Lansweeper database.

-assetTag <assetTag>
Will update the warranty information for a single Dell computer based on the
asset tag. Must provide a single asset tag.

-computer <computerName>
Will update the warranty information for a single Dell computer based on the
computer name. Must provide a single computer name.

-verbose
Print troubleshooting information to the console.

-help
Will display this screen.

NOTE: If no options are provided, will update all Dell computers.
138 REPLIES 138
RHOPE
Engaged Sweeper
Thanks, that worked!
wgknowles
Engaged Sweeper II
Perhaps you need .net ?
wgknowles wrote:
Perhaps you need .net ?

Spot on. More specifically it sounds as if you need .NET 3.5.
RHOPE
Engaged Sweeper
I am trying to run this action, but I am getting an error message. I am using integrated authentication and change the config file. Im using v1.7. I have SQL Express installed. Im using the free version of LAN sweeper (v3.5.2.16).

Is there a special location I need to place the file in?


Error

Unhandled Exception: System.IO.FileNoteFoundException: Could not load file or assembly 'System.Core, Version=3.5.0.0......The system cannot find the file specified. Filename: 'system.Core, Version=3.5.0.0



My Config File

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="connectionString" value="Data Source=LANSWEEPER\SQLLANSWEEPER;Initial Catalog=lansweeperdb;Integrated Security=True;Connection Timeout=400"/>
</appSettings>
</configuration>
mrdaytrade
Engaged Sweeper III
Well I am back to try the new version of this in hopes to get it to work with our proxy authorization. I get the following error:

3/7/2010 1:13:54 AM+Query for: 1
System.ArgumentNullException: Value cannot be null.
Parameter name: input
at System.Text.RegularExpressions.Regex.Matches(String input)
at UpdateDellWarrantyInfo.warrantyInfo..ctor(String URL, String ServiceTag)
at UpdateDellWarrantyInfo.Program.Main(String[] args)
at System.Text.RegularExpressions.Regex.Matches(String input)
at UpdateDellWarrantyInfo.warrantyInfo..ctor(String URL, String ServiceTag)
at UpdateDellWarrantyInfo.Program.Main(String[] args)


Config file:
<add key="connectionString" value="Data Source=OLDLANSWEEPER\SQLEXPRESS;Initial
Catalog=lansweeperdb;Integrated Security=True;Connection Timeout=400"/>

This is the error using v1.6

3/7/2010 1:29:09 AM+Query for: 1403
System.Net.WebException: The remote server returned an error: (407) Proxy Authen
tication Required.
at System.Net.HttpWebRequest.GetResponse()
at UpdateDellWarrantyInfo.warrantyInfo..ctor(String URL, String ServiceTag)
at System.Net.HttpWebRequest.GetResponse()
at UpdateDellWarrantyInfo.warrantyInfo..ctor(String URL, String ServiceTag)
3/7/2010 1:29:09 AM -Purchase Date: null
3/7/2010 1:29:09 AM -Warranty Date: null

In our organization we are required to enter our user name and password when requesting an internet site. These are the same credentinals as logging in to the domain. What user name and password gets passed to the proxy using this exe? Our proxy port is 8080.

****** UPDATE *******

I decided to tether my Blackberry to get around the proxy issue. My Database is now full of dell warranty info!
Hemoco
Lansweeper Alumni
A nice update for Dell would be the following:
Scrape the warranty description "Next Business Day, ..." and add it to one of the custom fields. (custom10 or something)
BSONO
Engaged Sweeper II
SSEAL actually has already provided the correct links.

http://www.lansweeper.com/forum/yaf_postst2645_HP-part-Numberserial-correction-and-Warranty-Links.aspx
Hemoco
Lansweeper Alumni
I don't think HP has a webpage with the warranty date.
Does anyone have a link?
rkotvis
Engaged Sweeper
Lansweeper wrote:
I don't think HP has a webpage with the warranty date.
Does anyone have a link?


It's here: http://www11.itrc.hp.com/service/ewarranty/warrantyInput.do
Roelof Kotvis Bouwvereniging "Woningbelang" LinkedIn Profile
BSONO
Engaged Sweeper II
I found the HP part number in the BIOS under the heading SKU Number. I also found this script below to pull it through WMI, however, when I look at the SKU Number in WMI CIM Studio its blank. The script pulls back a blank SKU number also. Maybe, it will make sense to someone and they can figure it out. Thanks,

Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystemProduct",,48)
For Each objItem in colItems
Wscript.Echo "Caption: " & objItem.Caption
Wscript.Echo "Description: " & objItem.Description
Wscript.Echo "IdentifyingNumber: " & objItem.IdentifyingNumber
Wscript.Echo "Name: " & objItem.Name
Wscript.Echo "SKUNumber: " & objItem.SKUNumber
Wscript.Echo "UUID: " & objItem.UUID
Wscript.Echo "Vendor: " & objItem.Vendor
Wscript.Echo "Version: " & objItem.Version
Next