Automated eject of tape drive 
Author Message
 Automated eject of tape drive

Hi all,

I perform a daily backup on my computer (DAT tape drive).
The job is sheduled to execute sometimes in the night.
Unfortunalty the backup software isn't able to eject the
tape after finishing the job. Now I want to automate this
by using VBScript.
Could anybody tell me how I can eject the drive with
VBScript or WSH?

Thanks for your help
Detlef



Sat, 26 Nov 2005 17:00:13 GMT  
 Automated eject of tape drive
I don't know precisely with a tape drive, but I know it can be done with a
cd drive.  Maybe you can adapt this to a tape drive.  This script will open
all CD Rom drives on the user's computer.

Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection
if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next ' cdrom
End If

--

need to e-mail me off list just get rid of "your fears" and
drop me a line.


Quote:
> Hi all,

> I perform a daily backup on my computer (DAT tape drive).
> The job is sheduled to execute sometimes in the night.
> Unfortunalty the backup software isn't able to eject the
> tape after finishing the job. Now I want to automate this
> by using VBScript.
> Could anybody tell me how I can eject the drive with
> VBScript or WSH?

> Thanks for your help
> Detlef



Sat, 26 Nov 2005 23:28:09 GMT  
 Automated eject of tape drive
Hi

Another generic approach for ejecting any removable drive (works on CDs and
zips, at least) is (insert your drive letter, most cases work without the
ampersand):

set oMyCptr = createObject("shell.application").nameSpace(17)
oMyCptr.parseName("B:\").invokeVerb("e&ject")

Joe Earnest



Sun, 27 Nov 2005 01:23:42 GMT  
 Automated eject of tape drive


Quote:
> I don't know precisely with a tape drive, but I know it can be done
> with a cd drive.  Maybe you can adapt this to a tape drive.  This
> script will open all CD Rom drives on the user's computer.



Quote:
> Another generic approach for ejecting any removable drive (works on
> CDs and zips, at least) is (insert your drive letter, most cases work
> without the ampersand):

> set oMyCptr = createObject("shell.application").nameSpace(17)
> oMyCptr.parseName("B:\").invokeVerb("e&ject")

Neither of these is likely to work with a tape drive, which generally HAS
no driveletter, and certainly isn't visible to Windows Media Player.

The correct answer depends very much on your operating system. Under
Windows NT, it is very simple:

NTBACKUP EJECT

If you are using Windows 2000/XP/2003, you probably have to use the
Removable Storage Management service.  If your tape drive happens to be
connected by ATAPI rather than SCSI, it's straightforward:

NET STOP ntmssvc
RSM EJECTAPI /n0
NET START ntmssvc

If it's a SCSI tape, it's probably hopeless.  There is some combination of
settings after "RSM EJECT" that will do the trick, but I've never made it
work myself.

--
Ross Presser -- rpresser AT imtek DOT com
"... VB is essentially the modern equivalent of vulgar Latin in 13th
Centurary Europe. Understand it, and you can travel to places you never
heard of and still understand some people." -- Alex K. Angelopoulos



Sun, 27 Nov 2005 01:48:15 GMT  
 Automated eject of tape drive
Hi Ross,


Quote:
> Neither of these is likely to work with a tape drive, which generally HAS
> no driveletter, and certainly isn't visible to Windows Media Player.

Good correction.  My very limited limited experience with tape drives has
involved IDE drive letters, and I didn't think about the fact that most
don't.

Joe Earnest



Sun, 27 Nov 2005 02:18:10 GMT  
 Automated eject of tape drive


Quote:
> Hi all,

> I perform a daily backup on my computer (DAT tape drive).
> The job is sheduled to execute sometimes in the night.
> Unfortunalty the backup software isn't able to eject the
> tape after finishing the job. Now I want to automate this
> by using VBScript.
> Could anybody tell me how I can eject the drive with
> VBScript or WSH?

> Thanks for your help
> Detlef

Hi,
http://www.experts-exchange.com/CXO/Operating_Systems/Win2000/Q_20550...

This is not vbs or wsh, but it works fine.

Maybe it will be enough for you.

Regards,
Zbyszek



Sun, 27 Nov 2005 02:50:01 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Eject LTO tape drive using scripting

2. how can I know that a tape drive does not contain a tape

3. Eject my cd drive ?

4. Eject my cd drive

5. audio-tape.ps v1.21 - print cassette/DAT/8mm tape box labels

6. how to know if a tape drive contain a tape.

7. How can I know the name of the tape in the tape device?

8. How can I know the name of the tape in the tape device?

9. Ejecting CD's

10. gs just ejects blank pages

11. how to do a page eject

12. Eject CD-ROM

 

 
Powered by phpBB® Forum Software