I'm trying to figure out the following. In the end I want the script to be detecting all mounted drives and running designated programs on them. Code: IF "HKLM\SYSTEM\MountedDevices" /v "\DosDevices\C:"=="5c ?" set Cdrive=0 Where "5c ?" is a hex value and 5c is the first term, if that term is 5c then the drive is not mounted. If another term is there, then the drive is mounted. I figure if I query each possible drive from C-Z in this way I can then do something like: Code: if "%Cdrive%"=="1" run program C: /switch And so on down through to Z. Mounted Drive info is stored in "HKLM\SYSTEM\MountedDevices". Anyone have suggestions on a better way I'd love to hear it. /edit I've come up with an alternative, instead of using the registry entry as a flag, I'll use the "Recycler" folder created on all drives.