Sign in to follow this  
Followers 0
TravisC

detecting flash/solid state media

4 posts in this topic

hi, i need to know if there is any way to detect if a drive is flash media or not. I know there is a removable or fixed thing but i assume that it will see external hard drives as removable also. i just need to be able to distinguish between hdds and solid state/flash drives

thanks for any help

Share this post


Link to post
Share on other sites



does nobody know the answer to this? and if autoit can't do it, what similar scripting languages can?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Try searching for USB drive (there are lots of examples of it), that's what I did to create a detection and block script.

PS, welcome to the forums

Edited by Legacy99

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Try the DriveGetDrive() and DriveGetType() Functions.

Alternatively, if you are familiar with WMI, you can use that to query drive info. *I Recommend*

$objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\localhost\root\cimv2")
$colItems = $objWMIService.ExecQuery("Select * from Win32_DiskDrive Where (InterfaceType like " & chr(34) & "%USB%" & chr(34) & ")")
For $objItem in $colItems
    msgbox(0,$objItem.Caption,$objItem.MediaType)
Next

http://msdn2.microsoft.com/en-us/library/a...132(VS.85).aspx

Edited by spudw2k

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