#180390 - 2007-09-11 04:49 PM
Dell System Information
|
david_minter
Fresh Scripter
Registered: 2007-05-18
Posts: 20
|
Hi Guys, hope your all well today.
I need to retrieve the system info from dell PC's so I can run a script just on laptops. Does anyone have any ideas on how I may be able to do this ??
Thanks
|
|
Top
|
|
|
|
#180391 - 2007-09-11 04:54 PM
Re: Dell System Information
[Re: david_minter]
|
Arend_
MM club member
   
Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
|
What kind of system info ? You might want to take a look a the Kix-O-Matic
|
|
Top
|
|
|
|
#180392 - 2007-09-11 04:56 PM
Re: Dell System Information
[Re: Arend_]
|
david_minter
Fresh Scripter
Registered: 2007-05-18
Posts: 20
|
Make and model. I need to run a script on logon for laptops only, and I can't think of another way of doing this without a registry key or something similar
|
|
Top
|
|
|
|
#180394 - 2007-09-11 05:16 PM
Re: Dell System Information
[Re: Glenn Barnas]
|
david_minter
Fresh Scripter
Registered: 2007-05-18
Posts: 20
|
Thanks Glenn, slight problem accessing your website via the link on your message, I just get page cannot be displayed everytime !
Edited by david_minter (2007-09-11 05:26 PM)
|
|
Top
|
|
|
|
#180398 - 2007-09-11 06:06 PM
Re: Dell System Information
[Re: Björn]
|
david_minter
Fresh Scripter
Registered: 2007-05-18
Posts: 20
|
Thanks Bjorn,
I'm not quiet sure what the script is mean't to do .. I have changed the compname and run the script, but nothing happens ?!?
|
|
Top
|
|
|
|
#180402 - 2007-09-11 06:11 PM
Re: Dell System Information
[Re: david_minter]
|
david_minter
Fresh Scripter
Registered: 2007-05-18
Posts: 20
|
Bjorn, Ignore me ! your script worked perfectly, it was my fault it didn't work first time (sorry !!)
thanks for your help
|
|
Top
|
|
|
|
#180405 - 2007-09-11 06:25 PM
Re: Dell System Information
[Re: Björn]
|
david_minter
Fresh Scripter
Registered: 2007-05-18
Posts: 20
|
Bjorn,
as I'm still learning scripts, could you explain how your script works and where it retrieves the information from ?
Thanks
|
|
Top
|
|
|
|
#180408 - 2007-09-11 06:58 PM
Re: Dell System Information
[Re: Björn]
|
Arend_
MM club member
   
Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
|
KixOmatic would have provided those scripts for you
|
|
Top
|
|
|
|
#180411 - 2007-09-11 09:22 PM
Re: Dell System Information
[Re: Arend_]
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11631
Loc: CA
|
Here is an OLD script that hopefully should still work at least some. Code could probably use an update though.
Break On
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')
Dim $MyBIOSInfo,$Q
Global $Make,$Model,$SerNumb,$HKLMSMWCVAP,$Explorer,$Msg
$HKLMSMWCVAP = 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths'
$Explorer = ReadValue($HKLMSMWCVAP + '\IEXPLORE.EXE','')
$MyBIOSInfo=GetBIOSInfo()
$Make = $MyBIOSInfo[0]
$Model = $MyBIOSInfo[1]
$SerNumb = $MyBIOSInfo[2]
$Msg=MessageBox('MFG : ' + $Make +@CRLF + 'Model: ' + $Model + @CRLF + 'Serial : ' + $SerNumb + @CRLF+@CRLF+
'Go to the Web Support site for drivers ? ','Computer Model',4385)
If 1=$Msg
GoToMake()
EndIf
Exit 1
Function GetBIOSInfo()
Dim $WMIService, $Mfg,$Model,$Ser
Dim $MItem,$SItem, $SerialNumber, $Manufacturer
$WMIService = GetObject("winmgmts:" + "\root\cimv2")
$Mfg = $WMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
$Ser = $WMIService.ExecQuery("Select * from Win32_BIOS",,48)
For Each $MItem In $Mfg
If $MItem
$Manufacturer = Trim($MItem.Manufacturer)
$Model = Trim($MItem.Model)
EndIf
Next
For Each $SItem In $Ser
If $SItem
$SerialNumber = Trim($SItem.SerialNumber)
EndIf
Next
$GetBIOSInfo=$Manufacturer,$Model,$SerialNumber
EndFunction
Function GoToMake()
Dim $URL
Select
Case InStr($Make,'dell') $URL = "http://support.dell.com/support/downloads/index.aspx?ServiceTag="+$SerNumb
Case 1 $URL = ''
EndSelect
If $URL
RUN $Explorer + ' ' + $URL
Else
$Msg=MessageBox('Unable to determine computer model.','Model unknown',48)
EndIf
EndFunction
|
|
Top
|
|
|
|
#180413 - 2007-09-11 10:29 PM
Re: Dell System Information
[Re: david_minter]
|
kholm
Korg Regular
   
Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
|
The most reliable method to check if your computer is a laptop is to check if it has a battery. Try using the function: IsLaptop()
Break On
If IsLaptop()
'Your Computer is a portable device'
Else
'Your Computer is a NOT portable device'
EndIf
Get $x
Function IsLaptop()
Dim $oWMI,$cItems,$oItem
$oWMI = GetObject("winmgmts:root\cimv2")
$IsLaptop=0
$cItems = $oWMI.ExecQuery("Select * from Win32_Battery",,48)
For Each $oItem In $cItems
$IsLaptop=1
Next
EndFunction -Erik
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 484 anonymous users online.
|
|
|