Jump to content

Determine Model name of PC using Autoit?


Recommended Posts

Below is the WMI code we are using to determine a machine model

On Error Resume Next
dim sModel
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
For Each objItem in colItems
    sModel = objItem.Model
Next

Is there a way to do the same within Autoit? Or is there a DLL call or API call I can use using Autoit?

Cheers

Edited by lyledg
Link to post
Share on other sites

Below is the WMI code we are using to determine a machine model

On Error Resume Next
dim sModel
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
For Each objItem in colItems
    sModel = objItem.Model
Next

Is there a way to do the same within Autoit? Or is there a DLL call or API call I can use using Autoit?

Cheers

<{POST_SNAPBACK}>

Someone Posted this the other day:

MsgBox(0,"",RegRead("Hkey_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0\", "ProcessorNameString"))

Hardcopy

Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad

Link to post
Share on other sites

If it's a branded machine, look for oeminfo.ini in system32 folder. This is the info that shows up in system properties.

Link to post
Share on other sites

Thanx for all the replies guys, but I have already compiled the script using quaizywabbit's suggestion and it works great!!! Great to know we can finally make an executable outof WMI calls!!!

VERY HAPPY!!! :whistle::dance: :dance:

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...