#69221 - 2002-08-22 10:11 PM
Re: Log Dell Service Tag (a little bit off-topic)
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
I'd not use computersystemproduct... but use systemenclosure instead.
This is what I use for hardware detection for my collection of Dell laptops and compaq desktops.
code:
:Hardware $CPUsp =@mhz $Memory =Memorysize(0) +1 $Modem =WMIQuery("Description","Win32_POTSModem") $HD =WMIQuery("Size","Win32_DiskDrive") $hdGB =left($hd,len($hd)-9) $Make =WMIQuery("Manufacturer","Win32_ComputerSystem") $Model =WMIQuery("Model","Win32_ComputerSystem") $Biosv =WMIQuery("SMBIOSBIOSVersion","Win32_BIOS") $biosd =WMIQuery("Version","Win32_BIOS") $asset =WMIQuery("SMBIOSAssetTag","Win32_SystemEnclosure") if instr($asset,"|") for each $return in split($asset,"|") if $return $asset=$return endif next endif $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 select case instr("$model","deskpro") $case="Desktop" case instr("$model","evo") $case="Desktop" case instr("$model","latitude") $case="Laptop" case 1 $case="Not Specified" endselect
? color c+/n " Computer Model: " color w+/n "$Make $Model $case" color w/n ? color w/n " " color w+/n trim(@CPU)" / $memory MB / $hdGB GB" color w/n ? color c+/n " Serial Number: " color w+/n $SerNo color c+/n" AHCATag: " color w+/n $asset color w/n
as for the errors, it is probably a typo.. can't tell without knowing the code or exact error
|
|
Top
|
|
|
|
#69222 - 2003-07-25 10:04 PM
Re: Log Dell Service Tag (a little bit off-topic)
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
I have been reading through this post about pulling the Dell service tag information. What I would really like to see is if it is possible to put this information so it is displayed in a messagebox. Has anyone ever tried that?
|
|
Top
|
|
|
|
#69225 - 2003-07-28 02:13 PM
Re: Log Dell Service Tag (a little bit off-topic)
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
The 3 posts were not my intention and didn't even know that I did. However, you say you can put pretty much anything in the messagebox. I have the messagebox format correct but for some reason it never works because of the commands being used in the Dell Service Tag scripts provided earlier. In the messagebox the only thing that seems to work is the Macros.
|
|
Top
|
|
|
|
#69226 - 2003-07-28 02:18 PM
Re: Log Dell Service Tag (a little bit off-topic)
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
post your code and we'll look at it
|
|
Top
|
|
|
|
#69227 - 2003-07-28 02:27 PM
Re: Log Dell Service Tag (a little bit off-topic)
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Well the code for the My Computer Information on page 1 is what I am currently using that works. All I want to do is somehow add that Dell Service Tag information to it and have it show up in the second section when running the My Computer Information Script.
|
|
Top
|
|
|
|
#69229 - 2003-07-28 03:34 PM
Re: Log Dell Service Tag (a little bit off-topic)
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Here is the code for the My Computer Information untouched:
code:
;=============================================================================================== ;***** Created with KiXscripts Editor | http://KiXscripts.com ***** ;***** Last Modified on 3/25/2003 at 3:27:28 PM by mmontgomery *****
;===============================================================================================
; *** File Name: MYCOMP.KIX *** v1.3 ; *** Date Created: 2002-03-05 by Ron Lewis ; *** Last Date Modified: 2002-10-01 11:20 PST - By Ron Lewis ; *** CHANGE: Updated for use with GetIPinfo UDF, added CPU & Speed, and Low disk space warning. ; *** Removed the amount of days, SMS ID, USER SID so that all info would fit on 800x600 ; *** Comments: This file is called by a shortcut on the users desktop. ; *** Acknowledgments: Thanks to the following for help and ideas ; *** Shawn, Bryce, Fabian, bleonard, and Howard Bullock
Break On $IPaddr = EnumIPInfo(0,0) If $IPaddr = "0.0.0.0" OR $IPaddr = "" $IPinfo = GetIPinfo() $IPaddr = $IPinfo[0] $SNmask = $IPinfo[1] $Gateway = $IPinfo[2] Else $SNmask = EnumIPInfo(0,1) $Gateway = EnumIPInfo(0,3) EndIf
$nul = SetConsole("hide") $HKLMAppPaths = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths" ; CheckIE variables Dim $RC1, $RC2, $RC3, $TmpLen1, $TmpLen2, $TmpLen3 Dim $IEBuild, $IEFullVer, $IEMajor, $IEMinor, $IESubBd, $IEVer, $IECustom, $IEName
While @error = 0 $app = EnumKey("$HKLMAppPaths\",$index) $index = $index + 1 Select Case $app = "excel.exe" $path = ReadValue("$HKLMAppPaths\$app","path") $Excelver = GetFileVersion("$path\$app","Productversion") Case $app = "winword.exe" $path = ReadValue("$HKLMAppPaths\$app","path") $Wordver = GetFileVersion("$path\$app","Productversion") Case $app = "powerpnt.exe" $path = ReadValue("$HKLMAppPaths\$app","path") $PowerPointver = GetFileVersion("$path\$app","Productversion") Case $app = "msaccess.exe" $path = ReadValue("$HKLMAppPaths\$app","path") $Accessver = GetFileVersion("$path\$app","Productversion") Case $app = "mspub.exe" $path = ReadValue("$HKLMAppPaths\$app","path") $Publisherver = GetFileVersion("$path\$app","Productversion") Case $app = "winproj.exe" $path = ReadValue("$HKLMAppPaths\$app","path") $Projectver = GetFileVersion("$path\$app","Productversion") Case $app = "visio32.exe" $path = ReadValue("$HKLMAppPaths\$app","path") $Visiover = GetFileVersion("$path\$app","Productversion") Case $app = "outlook.exe" $path = ReadValue("$HKLMAppPaths\$app","path") $Outlookver = GetFileVersion("$path\$app","Productversion") EndSelect Loop
$Ex=$Excelver $Wo=$Wordver $Po=$PowerPointver $Ac=$Accessver $Pu=$Publisherver $Pr=$Projectver $Vi=$Visiover $Ou=$Outlookver
Gosub "CheckIE"
$DiskSpace = GetDiskSpace("C:\") /1024 $RequiredSpace="200" If $DiskSpace < $RequiredSpace $Low="WARNING! - WARNING! : Disk space on your C: drive is low" Else $Low="" EndIf $DaysLeft=365-@ydayno $rc="" $MyCPU="" $MySpeed=Val(@MHZ) $Mem = MemorySize() If $MySpeed < 1001 $MySpeed=("$MySpeed Mhz") Else $MySpeed=("$MySpeed Ghz") EndIf If @INWIN=1 ; Windows NT systems $MyCPU="CPU : "+@CPU +" "+$MySpeed $IsAdmin="" Select Case InGroup("\\@WKSTA\Administrators") = 1 $IsAdmin="Yes" Case 1 $IsAdmin="No" EndSelect $rc="Administrator : "+$IsAdmin EndIf
$SMS_ID=ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\Client\configuration\Client Properties\","SMS Unique Identifier") $pass_age=30-@pwage
; Message Box Display Section $HDNumber = MessageBox(" Sussex County Help Desk Support Number : 302-855-7898 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ My User Logon ID : @UserID Full Name : @FULLNAME Operating System : @PRODUCTTYPE Build @BUILD Service Pack Level : @CSD $MyCPU Memory Size : $Mem MB $rc Current Workstation Time : @TIME Available Drive Space On C: : $DiskSpace MB $Low ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ My Computer Name : @WKSTA Computer DNS Name : @HOSTNAME IP Address : $IPaddr Subnet Mask : $SNmask Default Gateway : $Gateway MAC Address : @address [B]Dell Service Tag :[/B] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Days Until Password Expires : $pass_age Password Age : @PWAGE Logon Domain : @domain Logon Server : @LSERVER Primary NT Group : @PRIMARYGROUP Home Directory : @HOMEDIR ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Microsoft Office: Access : $Ac Excel : $Ex Internet Explorer : $IEFullVer $IEName Outlook : $Ou PowerPoint : $Po Project : $Pr Publisher : $Pu Visio : $Vi Word : $Wo " ,"My Computer Information",262208,0) Goto end
:CheckIE ; REM ** Confirm Internet Explorer installed on system (See MS TechNet article Q164539) ; REM ** Format of IE Version numbers: x.xx.xxxx.xxxx (Major.Minor.Build.SubBuild) $RC1 = ReadValue ("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer", "Build") ; REM ** IE3 onward (s/b build only, or xxxxx.xxxx) $RC2 = ReadValue ("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer", "Version") ; REM ** IE4 or later only (s/b xx.xx.xxxx.xxxx) $RC3 = ReadValue ("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer", "IVer") ; REM ** IE3 only (s/b xxx) $IECustom = ReadValue ("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer", "CustomizedVersion") ; REM ** IE4 or later only: (IC = Internet Content Provider IS = Internet Service Provider CO = Corporate Administrator ) $TmpLen1 = Len ($RC1) $TmpLen2 = Len ($RC2) $TmpLen3 = Len ($RC3)
Select Case ($TmpLen1 = 5) AND (SubStr ($RC2, 4, 1) = ".") ; REM ** IE6 (WinXP) - MS error w/IE 6 where minor id is single charcter, and build value only 5 characters $IEMajor = SubStr ($RC2, 1, 1) $IEMinor = SubStr ($RC2, 3, 1) + "0" $IEBuild = SubStr ($RC2, 5, 4) $IESubBd = SubStr ($RC2, 10, $TmpLen2-9) $IEFullVer = $IEMajor + "." + $IEMinor + "." + $IEBuild + "." + $IESubBd Case ($TmpLen1 = 10) AND (SubStr ($RC2, 4, 1) = ".") ; REM ** IE6 (Win2K) - MS error w/IE 6 where minor id is single charcter $IEMajor = SubStr ($RC2, 1, 1) $IEMinor = SubStr ($RC2, 3, 1) + "0" $IEBuild = SubStr ($RC2, 5, 4) $IESubBd = SubStr ($RC2, 10, $TmpLen2-9) $IEFullVer = $IEMajor + "." + $IEMinor + "." + $IEBuild + "." + $IESubBd Case ($TmpLen1 = 14) OR ($TmpLen2 >= 11) ; REM ** IE5/IE4 - 14 is MS error w/IE 5.01 SP1 for Win2K, >=11 for various IE4, 5 versions not 14-character $IEFullVer = $RC2 $IEMajor = SubStr ($RC2, 1, 1) $IEMinor = SubStr ($RC2, 3, 2) $IEBuild = SubStr ($RC2, 6, 4) $IESubBd = SubStr ($RC2, 11, $TmpLen2-9) Case ($TmpLen1 >= 3) AND ($RC3 = "103") ; REM ** IE3 - the build number only $IEMajor = "4" $IEMinor = "70" $IEBuild = "$RC1" $IESubBd = "" $IEFullVer = $IEMajor + "." + $IEMinor + "." + $IEBuild Case (1) $Status = $Skip $wri = WriteLine (1, "Verified IE not installed." + $CR) Return EndSelect
; REM ** Determine exact version installed on system, (See MS TechNet article Q164539) Select Case ($IEFullVer >= "6.00.2600.0000") $IEVer = "6.00" $IEName="Internet Explorer 6" Case ($IEFullVer >= "6.00.2479.0006") $IEVer = "6.00" $IEName="Internet Explorer 6 Public Preview (Beta) Refresh" Case ($IEFullVer >= "6.00.2462.0000") $IEVer = "6.00" $IEName="Internet Explorer 6 Public Preview (Beta)" Case ($IEFullVer >= "5.50.4807.2300") $IEVer = "5.50 SP2" $IEName="Internet Explorer 5.5 Service Pack 2" Case ($IEFullVer >= "5.50.4522.1800") $IEVer = "5.50 SP1" $IEName="Internet Explorer 5.5 Service Pack 1" Case ($IEFullVer >= "5.50.4308.2900") $IEVer = "5.50" $IEName="Internet Explorer 5.5 Advanced Security Privacy Beta" Case ($IEFullVer >= "5.50.4134.0600") $IEVer = "5.50" $IEName="Internet Explorer 5.5" Case ($IEFullVer >= "5.50.4134.0100") $IEVer = "5.50" $IEName="Internet Explorer 5.5 (Windows Me - 4.90.3000)" Case ($IEFullVer >= "5.50.4030.2400") $IEVer = "5.50" $IEName="Internet Explorer 5.5 & Internet Tools Beta" Case ($IEFullVer >= "5.50.3825.1300") $IEVer = "5.50" $IEName="Internet Explorer 5.5 Developer Preview (Beta)" Case ($IEFullVer >= "5.00.3315.1000") $IEVer = "5.01 SP2" $IEName="Internet Explorer 5.01 SP2 (Windows 2000)" Case ($IEFullVer >= "5.00.3314.2101") $IEVer = "5.01 SP2" $IEName="Internet Explorer 5.01 SP2 (Windows 95/98 and Windows NT 4.0)" Case ($IEFullVer >= "5.00.3105.0106") $IEVer = "5.01 SP1" $IEName="Internet Explorer 5.01 SP1 (Windows 95/98 and Windows NT 4.0)" Case ($IEFullVer >= "5.00.3103.1000") $IEVer = "5.01 SP1" $IEName="Internet Explorer 5.01 SP1 (Windows 2000)" Case ($IEFullVer >= "5.00.2920.0000") $IEVer = "5.01" $IEName="Internet Explorer 5.01 (Windows 2000, build 5.00.2195)" Case ($IEFullVer >= "5.00.2919.6307") $IEVer = "5.01" $IEName="Internet Explorer 5.01 (Also included with Office 2000 SR-1)" Case ($IEFullVer >= "5.00.2919.3800") $IEVer = "5.01" $IEName="Internet Explorer 5.01 (Windows 2000 RC2, build 5.00.2128)" Case ($IEFullVer >= "5.00.2919.800") $IEVer = "5.01" $IEName="Internet Explorer 5.01 (Windows 2000 RC1, build 5.00.2072)" Case ($IEFullVer >= "5.00.2516.1900") $IEVer = "5.01" $IEName="Internet Explorer 5.01 (Windows 2000 Beta 3, build 5.00.2031)" Case ($IEFullVer >= "5.00.2614.3500") $IEVer = "5.00" $IEName="Internet Explorer 5 (Windows 98 Second Edition)" Case ($IEFullVer >= "5.00.2314.1003") $IEVer = "5.00" $IEName="Internet Explorer 5 (Office 2000)" Case ($IEFullVer >= "5.00.2014.0216") $IEVer = "5.00" $IEName="Internet Explorer 5" Case ($IEFullVer >= "5.00.0910.1309") $IEVer = "5.00" $IEName="Internet Explorer 5 Beta (Beta 2)" Case ($IEFullVer >= "5.00.0518.10") $IEVer = "5.00" $IEName="Internet Explorer 5 Developer Preview (Beta 1)" Case ($IEFullVer >= "4.72.3612.1713") $IEVer = "4.01 SP2" $IEName="Internet Explorer 4.01 Service Pack 2 (SP2)" Case ($IEFullVer >= "4.72.3110.8") $IEVer = "4.01 SP1" $IEName="Internet Explorer 4.01 Service Pack 1 (SP1)" Case ($IEFullVer >= "4.72.2106.8") $IEVer = "4.01" $IEName="Internet Explorer 4.01" Case ($IEFullVer >= "4.71.1712.6") $IEVer = "4.00" $IEName="Internet Explorer 4.0" Case ($IEFullVer >= "4.71.1008.3") $IEVer = "4.00" $IEName="Internet Explorer 4.0 Platform Preview 2.0 (PP2)" Case ($IEFullVer >= "4.71.544") $IEVer = "4.00" $IEName="Internet Explorer 4.0 Platform Preview 1.0 (PP1)" Case ($IEFullVer >= "4.70.1300") $IEVer = "3.02" $IEName="Internet Explorer 3.02 and 3.02a" Case ($IEFullVer >= "4.70.1215") $IEVer = "3.01" $IEName="Internet Explorer 3.01" Case ($IEFullVer >= "4.70.1158") $IEVer = "3.00" $IEName="Internet Explorer 3.0 (OSR2)" Case ($IEFullVer >= "4.70.1155") $IEVer = "3.00" $IEName="Internet Explorer 3.0" Case ($IEFullVer >= "4.40.520") $IEVer = "2.00" $IEName="Internet Explorer 2.0" Case ($IEFullVer >= "4.40.308") $IEVer = "1.00" $IEName="Internet Explorer 1.0 (Plus!)" EndSelect Return
Function GetIPinfo() Dim $IPinfo[3], $file, $RC, $Line, $pos, $Loop If Open(1,"%TEMP%\"+@WKSTA+".LOG", 5)= 0 $out = WriteLine(1, "Gathering IP info using GetIPinfo()") $x = Close(1) EndIf $file = "%TEMP%\"+@WKSTA+".LOG" If @inwin=1 Shell "%comspec% /c ipconfig >$file" Else Shell "winipcfg /batch $file" EndIf $RC = Open(5, "$file", 2) If $RC = 0 $Line=ReadLine(5) $Loop = 1 While (@ERROR = 0 AND $Loop = 1) If InStr($Line, ". . . : ") > 0 While (@ERROR = 0 AND $Loop = 1) Select Case InStr($Line, "IP Address") > 0 $pos = InStr($Line, ":") $IPinfo[0] = SubStr($Line, $pos+2, 15) Case InStr($Line, "Subnet Mask") > 0 $IPinfo[1] = SubStr($Line, $pos+2, 15) Case InStr($Line, "Default Gateway") > 0 $IPinfo[2] = SubStr($Line, $pos+2, 15) If $IPinfo[2] <> "0.0.0.0" AND $IPinfo[2] <> "" $Loop = 0 EndIf EndSelect $Line=ReadLine(5) Loop EndIf $Line=ReadLine(5) Loop $RC=Close(5) EndIf $GetIPinfo = $IPinfo EndFunction
:end Exit(0)
All I want to do is add a line in the second section or so that will pull and display the Dell Service Tag information. I made the line bold where I want to put it. I am just not sure where to place the code to display it correctly.
|
|
Top
|
|
|
|
#69231 - 2003-07-28 03:43 PM
Re: Log Dell Service Tag (a little bit off-topic)
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Thanks I had my question answered on kixscripts.com
|
|
Top
|
|
|
|
#69232 - 2003-07-31 07:35 PM
Re: Log Dell Service Tag (a little bit off-topic)
|
got2btru
Lurker
Registered: 2003-07-31
Posts: 1
Loc: DFW Metroplex
|
So are you guys running these scripts through the logon script, or running it remotely somehow. Also, are you piping it to a text file or what? I'd love to run this across my domain & pull this info to verify against my records, but don't want to have to wait for all my users to login.
Chris...
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 774 anonymous users online.
|
|
|