Jump to content

Recommended Posts

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
Posted

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

Posted

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
Posted

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..

Posted

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

Posted

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:

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...