+ Post New Thread
Results 1 to 5 of 5
Scripts Thread, Test 2 scripts on Dell / Lenovo laptops or desktops in Coding and Web Development; Script One : Code: Dim objWMIService Dim colItems strComputer = "." Set objWMIService = GetObject("winmgmts:\" & strComputer & "\root\cimv2") Set ...
  1. #1

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    7,819
    Thank Post
    1,624
    Thanked 752 Times in 703 Posts
    Rep Power
    256

    Test 2 scripts on Dell / Lenovo laptops or desktops

    Script One :

    Code:
    Dim objWMIService
    Dim colItems
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystemProduct",,48)
    For Each objItem in colItems
    msgbox "IdentifyingNumber: " & objItem.IdentifyingNumber & vbcrlf & _
        "Name: " & objItem.Name & vbcrlf & _
        "Vendor: " & objItem.Vendor & vbcrlf & _
        "Version: " & objItem.Version
    Next
    Script Two :

    Code:
    Dim objWMIService
    Dim colItems1, manu, model
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colItems1 = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
    
    For Each Item In colItems1
    manu = Item.Manufacturer
    model = Item.Model    
    Next
    
    msgbox manu & vbcrlf & model
    If someone can post back with results of each one ( one from a Lenovo machine and one from a dell machine )

    The thing I am interested in finding out is between the two which one uses the numerical model number ie 7514A87 ( for an M58 ) vs which one comes back with the string model ie actual model name ie M58 or D630 etc ??

    Basically just trying to refine my script and need to know which way is the better way of getting the information I am after.

  2. IDG Tech News
  3. #2

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    7,819
    Thank Post
    1,624
    Thanked 752 Times in 703 Posts
    Rep Power
    256
    bump - anyone ?

  4. #3

    broc's Avatar
    Join Date
    Jan 2006
    Location
    England
    Posts
    1,938
    Thank Post
    85
    Thanked 343 Times in 238 Posts
    Rep Power
    137
    ran them on a Dell Latitude E6500 notebook

    Script 1 reports

    IdentifyingNumber : zzzzzzz <== which is my DELL Service tag ID
    Name: Latitude E6500
    Vendor: Dell Inc
    Version:

    Script 2 reports

    Dell Inc
    Latitude E6500

  5. #4


    Join Date
    Feb 2007
    Location
    51.405546, -0.510212
    Posts
    6,148
    Thank Post
    180
    Thanked 1,852 Times in 1,376 Posts
    Rep Power
    496
    According to this, Lenovo puts the model name under 'Version'.

  6. #5

    AngryTechnician's Avatar
    Join Date
    Oct 2008
    Posts
    3,276
    Thank Post
    606
    Thanked 1,051 Times in 651 Posts
    Rep Power
    360
    Arthur is correct.

    Output from Dell OptiPlex 960:



    Output from Lenovo ThinkPad X131e:

    Attached Images Attached Images
    Last edited by AngryTechnician; 26th November 2012 at 04:30 PM.

SHARE:
+ Post New Thread

Similar Threads

  1. UEFI or BIOS to install 2008R2 on DELL T610
    By edutech4schools in forum Windows Server 2008 R2
    Replies: 4
    Last Post: 13th May 2011, 10:43 AM
  2. Laptops or Desktop
    By ba9ag in forum Hardware
    Replies: 17
    Last Post: 12th March 2010, 08:44 PM
  3. Replies: 23
    Last Post: 11th March 2010, 03:59 PM
  4. Laptop or Desktop
    By jcs808 in forum How do you do....it?
    Replies: 16
    Last Post: 17th March 2009, 12:07 PM
  5. Can anyone supply a quote for laptop or desktop?
    By rocknrollstar in forum Recommended Suppliers
    Replies: 1
    Last Post: 4th March 2009, 08:06 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •