How to programmatically execute the Explorers "right-click eject" on a drive?

Long story short: Backup Unit DELL RD1000 seen as F:\. Backup Software Backup Exec 10.

I need to eject the cartridge when bakcup is complete. Native "eject" from Backup Exec only works with tapes.

Th only thing that work is to open My Computer, select F: and right-click on it to click on Eject.

I wonder if tat can be done progammatically. Please do not suggest macro recorders or to look for DELL utilities.

Thanks in advance
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

you might want to look at nirsofts utilities on they have a small utility witch cam eject drives by comand line (and so from batch;) and do other nice stuff all from cmd line
C:\WINDOWS\system32\rsm.exe eject /LF"insertdrivenamehere" /astart

Does this do the trick?

Here's a microsoft support document that tell's how to create batch file that ejects the cartridge,
when backup is complete:
This is the link to the utility on Nirsoft, it has examples off comand lines you might find useful
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

phermiAuthor Commented:
thanks to both.

I tried RSM before and there was no way to pass a drivename that make it work. After many tries, the error is "Unable to open session with the RSM server?. We do not use RSM as we do not use tape libraries.

NIRCMD only works with CD-ROM units. This is  a removable disc.
I found a similar thread;
"aherskowitz: I created a batch file called "RetroEventHandler.bat" (see attached code)".... etc

Any help?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
phermiAuthor Commented:
MSavolainen: THanks. I think we are getting really close. THe only problem is that it seems I am not running a RSM server .. see this:

C:\Documents and Settings\Administrator>rsm.exe view /tphysical_media

Unable to open session with the RSM server.

C:\Documents and Settings\Administrator>
phermiAuthor Commented:
MSavolainen: Done. Thanks. In my case this is the bat created as I do not use RSM for anything else

REM Start RSM Service
net start ntmssvc
rsm.exe eject /pf"RD1000" /astart
net stop ntmssvc

the "RD1000" matches the "label" of the disc (right-click, properties, general)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Storage Software

From novice to tech pro — start learning today.