
Quick script to EJECT a CD.
Alex,
Thanks for your help. The WSH worked fine.
Thanks again,
Mike
"Alex K. Angelopoulos" <alex_angelopoulos_at_hotmail_dot_com_remove__> wrote
I have no clue what IOCTL_CDROM_EJECT_MEDIA means.
From a quick check of Google on these groups, using EJECT and CDROM, I
found:
(1)
http://home.att.net/~wshvbs/index.htm
(scroll down, look at "Opening and Closing the CD-ROM Drawer")
(2)
Following anonymously reposted:
Const CDROM = 4
For Each d in CreateObject("Scripting.FileSystemObject").Drives
If d.DriveType = CDROM Then Eject d.DriveLetter & ":\"
Next
Sub Eject(CDROM)
Dim ssfDrives
ssfDrives = 17
CreateObject("Shell.Application")_
.Namespace(ssfDrives).ParseName(CDROM).InvokeVerb("E&ject")
End Sub
(3) You can also use the Widnows Media Player; haven't investigated that
one...
Quote:
> Is there a way to write a script in WSH to just eject a cd. Possibly
using
> the IOCTL_CDROM_EJECT_MEDIA variable? If so would one of you highly
> intelligent developers please write me a rinky-dink script that will open
> the CD-ROM drive?
> Thanks for your help,
> Mike