#36581 - 2003-02-17 05:18 PM
Getting Dell Service Tag via login script
|
Bobby Chan
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
|
|
|
|
#36583 - 2003-02-17 05:39 PM
Re: Getting Dell Service Tag via login script
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
|
|
Top
|
|
|
|
#36584 - 2003-02-18 09:49 AM
Re: Getting Dell Service Tag via login script
|
uberpaco
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
|
|
|
|
#36586 - 2003-02-18 10:01 PM
Re: Getting Dell Service Tag via login script
|
Radimus
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.
|
|
Top
|
|
|
|
#36587 - 2003-02-20 01:53 PM
Re: Getting Dell Service Tag via login script
|
Bobby Chan
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
|
|
|
|
#36590 - 2003-02-26 03:36 PM
Re: Getting Dell Service Tag via login script
|
Bobby Chan
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.
|
|
Top
|
|
|
|
#36591 - 2003-07-31 10:20 AM
Re: Getting Dell Service Tag via login script
|
Jeroen
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
   
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.
|
|
Top
|
|
|
|
#36593 - 2003-07-31 01:26 PM
Re: Getting Dell Service Tag via login script
|
Jeroen
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
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
|
|
Top
|
|
|
|
#36595 - 2003-07-31 02:22 PM
Re: Getting Dell Service Tag via login script
|
Radimus
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))
|
|
Top
|
|
|
|
#36596 - 2003-07-31 02:36 PM
Re: Getting Dell Service Tag via login script
|
Jeroen
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
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
|
|
Top
|
|
|
|
#36598 - 2003-07-31 03:07 PM
Re: Getting Dell Service Tag via login script
|
Jeroen
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
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
   
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
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 633 anonymous users online.
|
|
|