Sign in to follow this  
Followers 0
beast

USB - Volume name

1 post in this topic

I know there is allot off stuff in here on Autoit and USB but believe me I have searched.

I Already have script to detect when USB is inserted (Find on this forum)

Have tried a lot of example where I can grab info from USB.

I know there is example to grab keys in registry for removable media.

And now to my question

How can I get Volume info thatis created or if exist used in this place.

HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices

When USB is inserted

Its this type of name I need.

\??\Volume{75bd6a93-fcaf-11dc-9aee-003005a7b14c}

Not this name \DosDevices\

I then can remount this USB to folder like this

Mountvol.exe "D:\USB\Unit1" \\?\Volume{75bd6a93-fcaf-11dc-9aee-003005a7b14c}\

I use this to notify when USB is inserted or removed.

$objWMIService.ExecNotificationQuery("SELECT * FROM __InstanceOperationEvent WITHIN 5 WHERE TargetInstance ISA 'Win32_DiskDrive'")

I know this key have all mounted volumes, but I need to have my USB inserted when

computer is powered on to have this key.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\CPC

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