Page 1 of 2 12>
Topic Options
#36581 - 2003-02-17 05:18 PM Getting Dell Service Tag via login script
Bobby Chan Offline
Fresh Scripter

Registered: 2002-02-07
Posts: 28
Loc: Montreal, Quebec, Canada
I was wondering if anybody tried getting the Dell Service Tag via a KiXtart script without using WMI. I searched all over and can't find any article on that. I also tried finding an exe that I could run to retrieve the Service Tag, but had not luck either. I would need it to run on Win9x and NT based systems. And help would be great. Thanks.
Top
#36582 - 2003-02-17 05:21 PM Re: Getting Dell Service Tag via login script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You might be able to use a DELL command-line utility for this if one exists.
_________________________
There are two types of vessels, submarines and targets.

Top
#36583 - 2003-02-17 05:39 PM Re: Getting Dell Service Tag via login script
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
checkout this thread: Log Dell Service Tag (a little bit off-topic)
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#36584 - 2003-02-18 09:49 AM Re: Getting Dell Service Tag via login script
uberpaco Offline
Fresh Scripter

Registered: 2002-08-02
Posts: 21
Here is a script that i have gotten from someone on this board (sorry have forgotten who)

code:
		
$VerNmb1 = READVALUE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion","CurrentVersion")
IF $VerNmb1 = "5.0"
$machine=@wksta
$TAG=WMIQuery("IdentifyingNumber","Win32_ComputerSystemProduct","$machine")
$MARKE=WMIQuery("Name","Win32_ComputerSystemProduct","$machine")
$TILLV=WMIQuery("Vendor","Win32_ComputerSystemProduct","$machine")
FUNCTION WMIQuery($what,$where, optional $computer)
dim $strQuery, $objEnumerator, $value
if not $computer $computer="@WKSTA" endif
$strQuery = "Select $what From $where"
$SystemSet = GetObject("winmgmts:{impersonationLevel=impersonate}!//$computer")
$objEnumerator = $SystemSet.ExecQuery($strQuery)
For Each $objInstance in $objEnumerator
If @Error = 0 and $objInstance <> ""
$=execute("$$value = $$objInstance.$what")
$WMIQuery="$value"+"|"+"$WMIQuery"
EndIf
Next
$WMIQuery=left($WMIQuery,len($WMIQuery)-1)
exit @error
ENDFUNCTION
ELSE
$TAG = "N/A"
$MARKE = "N/A"
$TILLV = "N/A"
ENDIF

We have Dell here at work and it works like a charm

[ 18. February 2003, 09:50: Message edited by: uberpaco ]

Top
#36585 - 2003-02-18 08:04 PM Re: Getting Dell Service Tag via login script
JimRobinson Offline
Fresh Scripter

Registered: 2003-01-10
Posts: 42
Loc: Tempe, AZ
Try this: sm_info.exe from Dell reads the bios directly. http://www.swynk.com/trent/articles/dellmif.asp
I used it in a batch login script to do exactly what you asked.

[ 18. February 2003, 20:08: Message edited by: JimRobinson ]
_________________________
Jim
--------------------

Top
#36586 - 2003-02-18 10:01 PM Re: Getting Dell Service Tag via login script
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
WMI is already on many NT machines (not all however), but it would make it much easier to manage in the long term, to deploy WMI to those machines without it.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#36587 - 2003-02-20 01:53 PM Re: Getting Dell Service Tag via login script
Bobby Chan Offline
Fresh Scripter

Registered: 2002-02-07
Posts: 28
Loc: Montreal, Quebec, Canada
Ended up using the sm_info.exe and retrieve the input from the generated text file. Thanks to all those who helped.
Top
#36588 - 2003-02-20 11:26 PM Re: Getting Dell Service Tag via login script
BoxKite Offline
Da Box
*****

Registered: 2000-05-17
Posts: 282
Loc: Vacaville,CA,USA
This works for me. My computers are NT and 2k. If KIXRPC is running, may work on 9x, anyway, give it a try.

1. Code for your computer service tag:
code:
$DellBIOS = GetObject("winmgmts:").ExecQuery("select * from Win32_BIOS")
if @error <> 0
? @error + " / " @serror ? ? shell "%comspec% /c pause"
else
for each $Item in $DellBIOS
$SerNum = $Item.SerialNumber
next
endif
? ? "Dell Service Tag: $SerNum" ? ? shell "%comspec% /c pause"
exit

2. Code for service tag on a remote computer is the same except you change the 1st line to:
code:
$DellBIOS = GetObject("winmgmts://RemoteComputerName or IPAddress").ExecQuery("select * from Win32_BIOS")

3. You can add the code to your logon script and have a file created each time a computer is logged onto; then, you can create another script to extract the information from the created files. You will need to insure the location where you are collecting the files have read/write permissions for group "everone." I recommend creating a hidden share (shareName$) for the location (\\serverName\shareName$), also with read/write permissions.
Here is my login script code.
code:
$DellBIOS = GetObject("winmgmts:").ExecQuery("select * from Win32_BIOS")
if @error = 0
for each $Item in $DellBIOS
$manuf = $Item.Manufacturer
$SerNum = $Item.SerialNumber
next
if $manuf = "dell computer corporation"
shell "%comspec% /c echo @wksta#@userid#$SerNum > \\serverName\shareName$\BIOS_@wksta"
endif
endif
exit



[ 20. February 2003, 23:33: Message edited by: BoxKite ]
_________________________
Box
FACTA NON VERBA

Top
#36589 - 2003-02-20 11:32 PM Re: Getting Dell Service Tag via login script
JimRobinson Offline
Fresh Scripter

Registered: 2003-01-10
Posts: 42
Loc: Tempe, AZ
Bobby,
I wasn't really sure whether sm_info needed WMI or if it just needed a DMI capable BIOS. Glad you came to some resolution.
_________________________
Jim
--------------------

Top
#36590 - 2003-02-26 03:36 PM Re: Getting Dell Service Tag via login script
Bobby Chan Offline
Fresh Scripter

Registered: 2002-02-07
Posts: 28
Loc: Montreal, Quebec, Canada
SM_INFO.exe is just an application that queries the bios at a specific address. Since our company is still running on KiXtart 3.62, it doesn't support WMI codes within the KiX script. Anyways, SM_INFO worked well and that's all that matters. I'm planning to upgrade the enterprise to 4.20 sometime next month. That should solve some of our scripting problems. [Smile]
Top
#36591 - 2003-07-31 10:20 AM Re: Getting Dell Service Tag via login script
Jeroen Offline
Starting to like KiXtart

Registered: 2001-08-16
Posts: 180
Loc: Netherlands
Hi all,

Can someone provide me the file SM_INFO.EXE ? Can't seem to find it on the internet, and the link provided above has been redirected/changed. You can mail me the file on jeroen.dg@xs4all.nl. Thanks!
_________________________
Regards, Jeroen. There are two ways to write error-free programs. Only the third one works.

Top
#36592 - 2003-08-01 12:33 AM Re: Getting Dell Service Tag via login script
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
I can't find it either..

What are your client machines?
How many?

WMI provides a lot more functionality than just this... It IS worth your time to install it on the machines without it.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#36593 - 2003-07-31 01:26 PM Re: Getting Dell Service Tag via login script
Jeroen Offline
Starting to like KiXtart

Registered: 2001-08-16
Posts: 180
Loc: Netherlands
We have about 350 PC's, from various makes and models (Compaq, Dell, and some unknowns), but only buy Dell nowadays. With WMI, the Latitude L400 / NT4 SP6a for example, is not recognised. Latitude C610 W2K / Optiplex GX150 NT4, and Optiplex 260 W2K works fine.
I'm using this code:

code:
; Determine Serialnr
$Serialnr = WMIQuery("SerialNumber","Win32_BIOS")
If LEN("$Serialnr") < 2
$Serialnr = WMIQuery("SerialNumber","Win32_SystemEnclosure")
If Instr($Serialnr,"|")
For Each $Return in Split($Serialnr,"|")
If LEN($Return)<10
$Serialnr = $Return
Endif
Next
Endif
If LEN("$Serialnr") < 2
$Serialnr = WMIQuery("IdentifyingNumber","Win32_ComputerSystemProduct","@WKSTA")
Endif
Endif
Endif

; Determine Model name
$MachineName = WMIQuery("Name","Win32_ComputerSystemProduct","@WKSTA")
If $MachineName = ""
$MachineName = "-------"
Endif

Can you tell me where can I download a program with which I can see what info is available via WMI, so that I can check on the L400 for example what to use instead of Win32_ComputerSystemProduct ?

P.s. We use all of the OS-ses; 95, 98, NT4, W2K.

[ 31. July 2003, 13:28: Message edited by: Jeroen ]
_________________________
Regards, Jeroen. There are two ways to write error-free programs. Only the third one works.

Top
#36594 - 2003-07-31 02:20 PM Re: Getting Dell Service Tag via login script
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
How about WMINT4.EXE, WMI9X.EXE from Microsoft?

Check to insure that the the folder WBEM exists on the system, before running your query -

%WINDIR%\system32\wbem

IIRC, Under 9x, it will be -

$WINDIR%\system\wbem

Of course, under W2k and up, this is no longer a concern as WMI is "built-in."

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#36595 - 2003-07-31 02:22 PM Re: Getting Dell Service Tag via login script
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
here is what I use:

code:
 	$Make 	=split(WMIQuery("Manufacturer","Win32_ComputerSystem"))[0]
$Model =trim(WMIQuery("Model","Win32_ComputerSystem"))
select
case instr("$model","pro") $case="Desktop"
case instr("$model","evo") $case="Desktop"
case instr("$model","lat") $case="Laptop"
case 1 $case="Not Specified"
endselect
$asset =WMIQuery("SMBIOSAssetTag","Win32_SystemEnclosure")
if instr($asset,"|")
for each $return in split($asset,"|")
if $return $asset=$return endif
next
endif
$asset =trim($asset)
$SerNo =WMIQuery("SerialNumber","Win32_BIOS")
if len($SerNo) < 2
$SerNo=WMIQuery("SerialNumber","Win32_SystemEnclosure")
if instr($serno,"|")
for each $return in split($serno,"|")
if len($return)<10 $serno=$return endif
next
endif
endif
$SerNo =trim(ucase($SerNo))

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#36596 - 2003-07-31 02:36 PM Re: Getting Dell Service Tag via login script
Jeroen Offline
Starting to like KiXtart

Registered: 2001-08-16
Posts: 180
Loc: Netherlands
I've installed WMI on the Latitude L model (NT4), my script now does recognise that it's a Latitude LS, but does not 'see' the serial number. The WMI browser I found on Microsoft's website (part of WMI admin tools), is only available for W2K. Is there a WMI browser for NT4?
Can't seem to find it at Microsoft...
_________________________
Regards, Jeroen. There are two ways to write error-free programs. Only the third one works.

Top
#36597 - 2003-07-31 02:43 PM Re: Getting Dell Service Tag via login script
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
browse remotely
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#36598 - 2003-07-31 03:07 PM Re: Getting Dell Service Tag via login script
Jeroen Offline
Starting to like KiXtart

Registered: 2001-08-16
Posts: 180
Loc: Netherlands
I still use NT4 on my own PC, and can't yet switch to W2K... I'd like to be able to do it from my workstation, instead of having to use a W2K system each time... But if there's no NT4 version, too bad, I'll have to.
_________________________
Regards, Jeroen. There are two ways to write error-free programs. Only the third one works.

Top
#36599 - 2003-08-01 09:26 AM Re: Getting Dell Service Tag via login script
Jeroen Offline
Starting to like KiXtart

Registered: 2001-08-16
Posts: 180
Loc: Netherlands
I've still got a problem; it seems that the serial and system model cannot be read on most of the systems during logon.

Maybe a service that hasn't started yet?

If I have the user logoff and logon again without rebooting, it works fine.. The first time they log on, strange things are logged, like SYSFexxx and BX-TJ and dt_ex (as model names).

Any ideas on how to solve this one?

By the way, I tested this behaviour on a Latitude C610 with Windows 2000 on it.

[ 01. August 2003, 09:29: Message edited by: Jeroen ]
_________________________
Regards, Jeroen. There are two ways to write error-free programs. Only the third one works.

Top
#36600 - 2003-08-02 12:21 AM Re: Getting Dell Service Tag via login script
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
It may be the WMI hasn't fully started

It may be User permission of the user.

I'm looking into making a inventory client that runs as a service to populate a file with the required data. Then any user can just read the data or the logon script can pull it
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
Page 1 of 2 12>


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 633 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.073 seconds in which 0.024 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org