Sign in to follow this  
Followers 0
PoojaKrishna

Please Help

5 posts in this topic

Hai friends,

How could I get the HardDisk-id of a system using an AutoIt script?

Please help

Pooja

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Thanks Joon

The 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

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  
Followers 0