PoojaKrishna Posted September 17, 2008 Posted September 17, 2008 Hai friends, How could I get the HardDisk-id of a system using an AutoIt script? Please help Pooja
Joon Posted September 17, 2008 Posted September 17, 2008 What kind of ID you are trying to get? Here sample of getting Device ID from WMI. $objWMIService = ObjGet("winmgmts:\\.\root\cimv2") $colItems = $objWMIService.ExecQuery ("SELECT * FROM Win32_DiskDrive") For $colItem In $colItems MsgBox(0,$colItem.Caption,$colItem.DeviceID) Next
PoojaKrishna Posted September 17, 2008 Author Posted September 17, 2008 Thank you Joon for your fast reply In my autoit code I want to get an Id that can uniquely identify the system other than the IP Pooja
Joon Posted September 17, 2008 Posted September 17, 2008 try this.http://www.autoitscript.com/forum/index.ph...mp;#entry131508
PoojaKrishna Posted September 18, 2008 Author Posted September 18, 2008 try this.http://www.autoitscript.com/forum/index.ph...mp;#entry131508Thanks JoonThe link was helpful, Only the last sample code is working with my system#include<String.au3>$OSLang = StringLeft(@OSLang, 3)$OSVersion = StringRight(@OSVersion, 2)$Id = ($OSLang & "-" &"-" & $OSVersion & "-" & @OSBuild & "-" & @ProcessorArch)$Unique = _StringEncrypt(1, $ID, @UserName); Or _StringEncrypt(1, @UserName, $ID)msgbox(0,"",$Unique)Pooja
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