This little script may help you out. Should have thought of this the first time around.
On Error Resume Next
CONST MY_COMPUTER = 17
strDrive = "E:\" ' default drive/overridden if drive pass on command line
If Wscript.Arguments.Count > 0 Then
strDrive = Wscript.Arguments.Unnamed.Item(0)
End If
Set WshShell = CreateObject("Shell.Application")
Set WshNamespace = WshShell.NameSpace(MY_COMPUTER)
Set d = WshNamespace.ParseName(strDrive)
d.InvokeVerb "E&ject"
WScript.Echo "It is now safe to remove " & strDrive & " drive"
As written, the default drive is E:. You can override this by passing the drive letter along the command line. Save the script with a vbs extension and run from the command line or call it from a batch file: cscript scriptname.vbs driveletter:\
Note: There is no built in error checking. The script will blindly attempt an eject, valid or not.
Good luck. 8-)