lyledg Posted August 2, 2005 Posted August 2, 2005 (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 August 2, 2005 by lyledg
HardCopy Posted August 2, 2005 Posted August 2, 2005 Below is the WMI code we are using to determine a machine modelOn 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 NextIs 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
quaizywabbit Posted August 2, 2005 Posted August 2, 2005 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
lyledg Posted August 2, 2005 Author Posted August 2, 2005 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..
blindwig Posted August 2, 2005 Posted August 2, 2005 If it's a branded machine, look for oeminfo.ini in system32 folder. This is the info that shows up in system properties. My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions
lyledg Posted August 2, 2005 Author Posted August 2, 2005 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!!! :dance:
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now