TravisC Posted February 29, 2008 Share Posted February 29, 2008 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 Link to comment Share on other sites More sharing options...
TravisC Posted March 9, 2008 Author Share Posted March 9, 2008 does nobody know the answer to this? and if autoit can't do it, what similar scripting languages can? Link to comment Share on other sites More sharing options...
Legacy99 Posted March 10, 2008 Share Posted March 10, 2008 (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 March 10, 2008 by Legacy99 Link to comment Share on other sites More sharing options...
spudw2k Posted March 10, 2008 Share Posted March 10, 2008 (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) Nexthttp://msdn2.microsoft.com/en-us/library/a...132(VS.85).aspx Edited March 10, 2008 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
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