Removedrive button


I'm using the removedrive utility to eject usb devices when I want to remove them but I'm having problems creating a button to work with it. What I would like to do is create a new menu button so that when I click it it lists all the removable devices on the system and then I can click the one I want to eject and the drive letter then gets passed to removedrive.

This is the command I'm using at the moment to show my removable devices.

Go DRIVEBUTTONS=fixed-cdefa,removable+i, hideempty

Is there anyway to use this list in a menu button, that when clicked would pass the drive letter instead of opening the drive in a lister?

I could create a dropdown menu and manually add entries for all the letters and set the values to be the drive letter but if possible I'd like the list to be dynamic and use the code above.


I don't know of a way to do this currently although I agree it would be handy to be able to eject removable drives like that from within Opus.

You might want to file a feature request for this.

Hi John,

Thanks for letting me know that.

I know you know the dopus commands quite well so if your saying this the chances are there is no way to achieve this, a feature request is probable best.


You still need an external, small tool like "RemoveDrive.exe" (w w w
Then create a button disconnecting special driveletters or with variable driveletter like this:

@set var = {dlgstring|Enter driveletter to disconnect:} /dopusdata\UserCommands\Tools\RemoveDrive.exe {$var}:\
Attention: Drives opened in DO's lister mostly can't be disconnected! You need to switch/go to another location first.

This tool is also very usable when using TrueCrypt-containers on external devices.

Yup, I missread you thread a bit.

To solve your problem as a workaround you should once connect all your external drives to your PC. Then reassign them all to higher (never needed) driveletters like S,T,U,V,W,..., so that the drives always get the same letters when connecting to PC. To reassign you can use windows' managemnet console. Then create a button that always removes the reassigned letters (like above STUVW...).

Depending on how the drive is mounted, you may not need the RemoveDrive.exe tool. If the drive has an Eject item on its context menu (and that item actually works; some removable drives have Eject items that don't work, even if nothing is locking them) then you can run this command:

ContextMenu FILE="D:" VERB="Eject"

Nudel, unfortunately that command doesn't work for my devices.

Sasa, that basically what i'm doing at the moment, i've built up a manual list of drive letters and then I select the one I want. I was just wondering if there was a better/smarter way of doing this.

No, unfortunately not.

I have three external USB-HD-Drives which I disconnect with one button (including truecrypt-images). I remove other external devices like camera (SD-Card) or USB-Sticks without secure removing tool, just wait 2-5 sec. after last operation or after flashing lights are off. I never had any problems, but I always would secure remove HD's (mechanical; bigger cache,...).

What I really miss is disconnecting without prompt that the drive still is in use when DO's lister is just only showing the dir. Also I miss the support to access the drives via their name/label, not just the drive-letter (GPSoft will try to include this in future; would be great because you won't need to look for the letter).

Sigh... are you saying that, in, Opus still holds locks on drives and prevents them being removed? Because I'm 99.9999% sure this is as "fixed" as it can ever be...

No, unfortunately and 100% not.

I have an external USB-HD connected. After opening the drive in a lister (without doing anything else) the drive will be locked. After switching to another drive it can be disconnected. But I use the above mentioned tool (RemoveDrive) to disconnect, maybe this causes the problem (but it shouldn't).

So if you have an Opus window viewing the drive you cannot remove it with RemoveDrive.exe, but if you point that Opus window somewhere else then it can be removed okay?

Yes. But I did some testing. It's RemoveDrive. Using Windows' tray-disconnect works (but it's not user friendly as you need to to do 2-3 steps to remove a drive)

Maybe RemoveDrive fails to broadcast the message which tells applications a drive is about to be removed so that they have a chance to let go of it.

Do you have another solution, e.g. a similar tool to removedrive?

Because windows' remove is very ununsable.

I just use the "Safely Remove" icon, or sometimes the right-click Eject item on the drive's context menu. Unless it's a TrueCrypt container in which case I use the TC tray icon as it always on screen.

I had to hide the Safely Remote icon so it's a few extra clicks to reach. It's hidden because NVidia's NForce SATA/IDE drivers for Vista put the internal SATA HDDs into the Safely Remove list (and don't seem to support the registry entry to exclude fixed drives, like NVidia's XP drivers do), so the icon is always displayed and offers the chance of offlining a fixed drive if you click the wrong thing. Which is nice.