Sign in to follow this  
Followers 0
lyledg

Determine Model name of PC using Autoit?

6 posts in this topic

#1 ·  Posted (edited)

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

Share this post


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

Share this post


Link to post
Share on other sites

do a search for "Scriptomatic" here on these forums...the whole Scriptomatic program was converted to AutoIt, and it generates .au3 scripts...


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

Thanks for thre reply Hardcopy, but that gives me the Processor model. I am looking for the brand of of laptop or PC, Say PC or Dell etc..

Thanks for the advice quaizywabbit, will have a look see..

Share this post


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.

Share this post


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:

Share this post


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
Sign in to follow this  
Followers 0