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
rgross
Engaged Sweeper III
I will second that request for HP support!
ChrisS
Engaged Sweeper III
The HP url that seems to work is:

http://h20000.www2.hp.com/bizsupport/TechSupport/WarrantyResults.jsp?country=US&sn=ADD_SERIAL_HERE


is there a way that this script can be customised for HP, this would be a fantastic addition.

Thanks in advance
Paul_van_Eijk
Engaged Sweeper
Hi All,

I just tried to use the UpdateDellWarrantyInfo version 1.7 with lansweeper version 4.2.0.54. It seems not to work.


C:\UpdateDellWarrantyInfo.v1.7>UpdateDellWarrantyInfo.exe -assetTag 2CJRL2J -verbose
4-11-2011 22:21:42*CON:Data Source=SERVER;Initial Catalog=
lansweeperdb;Persist Security Info=True;User ID=USER;Password=PASS;Connection Timeout=400
4-11-2011 22:21:42*SQL:SELECT TOP 1 Assetlink FROM tsysassetlinks WHERE (Vendor
LIKE 'dell%')
4-11-2011 22:21:43*URL:http://support.euro.dell.com/support/topics/topic.aspx/em
ea/shared/support/my_systems_info/nl/details?c=nl&cs=nlbsdt1&l=nl&s=bsd&~ck=anav
ml&servicetag={assettag}
4-11-2011 22:21:43*SQL:SELECT Computername, IdentifyingNumber FROM tblComputerSy
stemProduct WHERE (IdentifyingNumber = '2CJRL2J')
4-11-2011 22:21:43+Query for: 115
4-11-2011 22:21:48 -Purchase Date: '1-1-0001'
4-11-2011 22:21:48 -Warranty Date: '1-1-0001'
4-11-2011 22:21:48*SQL:begin tran;update dbo.tblCompCustom with (serializable) s
et PurchaseDate=@pd, Warrantydate=@wd where computername=@cn;if @@rowcount = 0 b
egin insert into dbo.tblCompCustom (Computername, PurchaseDate, Warrantydate) va
lues (@cn,@pd,@wd) end;commit tran;


The information Purchase Date: '1-1-0001' and Warranty Date: '1-1-0001' is incorrect because it need to be Purchase Date: '20-11-2006' and Warranty Date: '20-11-2009'. But if I look at the website of Lansweeper and go to the service tag number 2CJRL2J the fields Purchase Date and Warranty Datehave not been filled-in.



Can someone tell me how to fix this please?


Greetings Paul

Paul_van_Eijk
Engaged Sweeper
Hi All,

Can you tell me if this is working for the lansweeper version 4.2.0.54. If yes
where can I download the files. Is that the first page?


Greetings Paul
donglicao
Engaged Sweeper
Trying to download the files.
Corbett
Engaged Sweeper
I just found that Dell now has a web service that we can query for the warranty information. Anyone have the time to update the application to use the web service?

http://xserv.dell.com/services/assetservice.asmx?op=GetAssetInformation

Unfortunately I won't be able to do it unless the current way stops working.

Did this ever get anywhere on installing this to the LANSweeper new release, or did any one ever get the C source code for this?

The c# source code is attached to the first post of this thread.
john_e_wagner
Engaged Sweeper II
Just an FYI to Server 2008 SR2 Admins.

.Net 3.5 SP1 is required and it is NOT default installed. You can not download this framework to install it, you have to add the "feature" to Windows 2008 via the server manager. Otherwise you get a nasty error message telling you have a system Core Error. This means the server is calling for .net and not finding it. It looks like:


D:\Software\DellWarranty\1.7\UpdateDellWarrantyInfo.v1.7>UpdateDellWarrantyInfo.
exe -WarrantyInfo -verbose

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or ass
embly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c56193
4e089' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c
561934e089'
at UpdateDellWarrantyInfo.Program.Main(String[] args)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\M
icrosoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure lo
gging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fus
ion!EnableLog].



<http://blogs.msdn.com/b/sqlblog/archive/2010/01/08/how-to-install-net-framework-3-5-sp1-on-windows-server-2008-r2-environments.aspx>

Here is my config file for those of you connecting to a remote DB.



<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="connectionString" value="Data Source=SQLServerName;Initial Catalog=lansweeperdb;Integrated Security=True;Connection Timeout=400"/>
</appSettings>
</configuration>



Did this ever get anywhere on installing this to the LANSweeper new release, or did any one ever get the C source code for this?

JW
bho
Engaged Sweeper
Hi, this tool is useful. Thank you so much.

May I know is there a similar machanism for Lenovo or HP? My environment has mixtured brand.

Thanks,
bho wrote:
Hi, this tool is useful. Thank you so much.

May I know is there a similar machanism for Lenovo or HP? My environment has mixtured brand.

Thanks,


I'll echo the need for a Lenovo mechanism. If there was a way to strip out the first four of the type for the asseturl (type=4220 instead of type=4220UN5), that'd be ideal. Lacking an easy way to get the warranty info for the Lenovo computers is sad. 😞
BendItLikeBednar wrote:
bho wrote:
Hi, this tool is useful. Thank you so much.

May I know is there a similar machanism for Lenovo or HP? My environment has mixtured brand.

Thanks,


I'll echo the need for a Lenovo mechanism. If there was a way to strip out the first four of the type for the asseturl (type=4220 instead of type=4220UN5), that'd be ideal. Lacking an easy way to get the warranty info for the Lenovo computers is sad. 😞



Also in need of some Lenovo support... I constantly get asked for Lenovo warranty status etc... would be VERY helpful to have this instead of trying to get the information from other sources... 😜