Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

WMI Query v1.04

Displays WMI Class Info

  • Please log in to reply
12 replies to this topic

#1 ripdad

ripdad

    Member

  • Active Members
  • PipPipPipPipPipPip
  • 758 posts

Posted 06 April 2012 - 08:22 AM

There are a number of available programs for WMI that will show you information on Class Objects.

After many hours of research and testing, this is my small version. It mainly serves as a reference.

If you're working on a script, you'll still have to find an "example" on the web (if you can find one),
as this program won't provide you with any.

What will it provide?

The script queries information from WMI on your computer.
If the information exist, then you'll be able to view:

- Data Types
- Descriptions
- Mappings
- Origins
- Syntax for Methods
- System Properties for Classes
- and Other Useful Information

Sometimes, a particular class seems to be missing some information or has very little.
If you find what it's "Origin" is... sometimes you can glean something from it's parent.

--
Here are a few links from MSDN that might be of interest:

WMI Reference
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394572(v=vs.85).aspx

Standard WMI Qualifiers
http://msdn.microsoft.com/en-us/library/windows/desktop/aa393651(v=vs.85).aspx

MOF Data Types
http://msdn.microsoft.com/en-us/library/windows/desktop/aa392392(v=vs.85).aspx
--

Let me know if any problems. Thanks.

Version: 1.04
Attached File  WMI_Query.au3   22.3KB   253 downloads

Update: April 08, 2012
* added: Cache, saved in @AppDataDir\WMI_Query_Cache
* added: _DeleteCache(), Press F9 to delete.
* added: WM_GETMINMAXINFO(), GUI minimal resize.

Update: April 09, 2012
* fixed: HTML tags (left and right arrows) in some WMI strings, causing some data not to display.

Update: April 11, 2012
* fixed: Method Names that have a void CIMType. Would cause method name not to display.

Update: May 22, 2012
Adjusted the height for the combo's. The x64 restriction has been removed.

Edited by ripdad, 22 May 2012 - 04:05 PM.

  • UEZ likes this
I'm pretty sure this script has "some flaws" (somewhere). Welcome to programming!







#2 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,633 posts

Posted 06 April 2012 - 08:38 AM

Very useful, a little different to Scriptomatic. Thanks.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 26/09/2014


#3 UEZ

UEZ

    Never say never

  • MVPs
  • 5,041 posts

Posted 06 April 2012 - 11:03 AM

A different approach to display WMI methods! I like the displayed information - can be very useful.

But the loading is relatively slow. What about to save it locally and update it from time to time instead of loading them on startup everytime?

Br,
UEZ

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#4 ripdad

ripdad

    Member

  • Active Members
  • PipPipPipPipPipPip
  • 758 posts

Posted 07 April 2012 - 05:06 AM

Thanks for the replies.

guinness - I would say that WMI Query and Scriptomatic are Very different.

UEZ - Good idea. I'll work on it when I get the chance.
I'm pretty sure this script has "some flaws" (somewhere). Welcome to programming!

#5 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,633 posts

Posted 07 April 2012 - 07:26 AM

I agree.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 26/09/2014


#6 CaptainClucks

CaptainClucks

    Unum Cavillator Spuria

  • Active Members
  • PipPipPipPipPipPip
  • 1,227 posts

Posted 07 April 2012 - 07:12 PM

I like it, pretty useful to explore the different quarries available.

Also, I notice you've become victim to a rating troll, leme fix that.
Spoiler

Warning: Posts by this user are subject to change or may disappear without notice.


#7 ripdad

ripdad

    Member

  • Active Members
  • PipPipPipPipPipPip
  • 758 posts

Posted 08 April 2012 - 04:47 AM

ApudAngelorum - Thanks for the reply. I don't worry too much about ratings. Thanks anyway.

Updated 1st Post
I'm pretty sure this script has "some flaws" (somewhere). Welcome to programming!

#8 UEZ

UEZ

    Never say never

  • MVPs
  • 5,041 posts

Posted 09 April 2012 - 03:42 PM

Nice, now 2nd+ start is much faster!

Br,
UEZ

Edited by UEZ, 09 April 2012 - 03:42 PM.

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#9 ripdad

ripdad

    Member

  • Active Members
  • PipPipPipPipPipPip
  • 758 posts

Posted 10 April 2012 - 02:26 AM

UEZ - Yes, it turned out very well. Thanks for the suggestion!
I'm pretty sure this script has "some flaws" (somewhere). Welcome to programming!

#10 ripdad

ripdad

    Member

  • Active Members
  • PipPipPipPipPipPip
  • 758 posts

Posted 11 April 2012 - 04:16 AM

Found another issue - Updated 1st Post
I'm pretty sure this script has "some flaws" (somewhere). Welcome to programming!

#11 lovehack2006

lovehack2006

    Seeker

  • New Members
  • 1 posts

Posted 21 May 2012 - 03:42 AM

it seems cant't support x64 ,can your modify the code ?

#12 ripdad

ripdad

    Member

  • Active Members
  • PipPipPipPipPipPip
  • 758 posts

Posted 21 May 2012 - 11:47 AM

It works on my Win7 x64. I also tested and it works on Vista x64.

More information would be useful.

1) Computer
2) Operating System
3) Error Code/Message
4) Script Line that causes the error

Thanks so much.
I'm pretty sure this script has "some flaws" (somewhere). Welcome to programming!

#13 ripdad

ripdad

    Member

  • Active Members
  • PipPipPipPipPipPip
  • 758 posts

Posted 22 May 2012 - 03:58 PM

Updated 1st Post - Fixed the silly problem with x64 not displaying the combo's properly.
I'm pretty sure this script has "some flaws" (somewhere). Welcome to programming!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users