Jump to content
Sign in to follow this  

UUID from Win32_ComputerSystemProduct

Recommended Posts


I have been long trying to sort out a script to get ALL required Hardware info from PC. trouble is that many of my WMI calls dont work i.e., simply return nothing. so , literally any UDF which are available here dont serve my purpose only to some extent - more or less to what i had got...

now, trying to sort out UUID

; Generated by AutoIt Scriptomatic November 25, 2009

$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$colItems = ""
$strComputer = "localhost"

$Output &= "Computer: " & $strComputer  & @CRLF
$Output &= "==========================================" & @CRLF
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystemProduct", "WQL", _
                                          $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

If IsObj($colItems) then
   For $objItem In $colItems
      $Output &= "Caption: " & $objItem.Caption & @CRLF
      $Output &= "Description: " & $objItem.Description & @CRLF
      $Output &= "IdentifyingNumber: " & $objItem.IdentifyingNumber & @CRLF
      $Output &= "Name: " & $objItem.Name & @CRLF
      $Output &= "SKUNumber: " & $objItem.SKUNumber & @CRLF
      $Output &= "UUID: " & $objItem.UUID & @CRLF
      $Output &= "Vendor: " & $objItem.Vendor & @CRLF
      $Output &= "Version: " & $objItem.Version & @CRLF
      if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop
   Msgbox(0,"WMI Output","No WMI Objects Found for class: " & "Win32_ComputerSystemProduct" )


i am posting here a sample made from Win32_ComputerSystemProduct using AIScriptomatic the above sample would give me

UUID: 0AB87428-9F5A-11DC-9C82-30986417DAF4

but in reality other software like PC Wizard / Crystal DMI all say it is different!!!! the first few digits are jumbled, actually.

Unique ID : 2874B80A-5A9FDC11-9C823098-6417DAF4
- this is what i get from any other software i use...

Share this post

Link to post
Share on other sites

The $objItem.UUID seems to be correct. The other one just copy or construct the GUID structure incorrectly, not sure though. How do you get the later GUID? Is the program just posting the GUID this way in some sort of a field or message box?

Share this post

Link to post
Share on other sites

I used PC Wizard to retrieve the data and to get a reconfirmation i used Crystal DMI both give me 2874B80A-5A9FDC11-9C823098-6417DAF4 and thats when i got a doubt ?.

i had been searching and one of the intel forums also specifies the usage of WMI to get the UUID but then how was two other software able to get the same (if wrong) value????

Share this post

Link to post
Share on other sites

guys, its been a while and i would think i should close saying the WMI info is to be just formatted properly to get the widely accepted UUID value.

i havent understood why WMI would give me some value and other software actually interpret the same little differently.

i would post the updated code if i get a universal formatting pattern.

Share this post

Link to post
Share on other sites

Since your initial post a lot has happened :huh2: Now in WinAPIEx.au3 by Yashied is a Function called _WinAPI_UniqueHardwareID(), this is a lot more accurate and the code structure is alot different from your first post ;)

Edited by guinness

UDF List:

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_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()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

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