Shortcut Question.

G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

Hi, Is there a way to make a shortcut or a vb script to open a CD drive. I
know there are some programs that will do this but I'd rather not use
another program.


Thanks, John.
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

Set objShell = CreateObject("Shell.Application")
Set MyComp=objShell.NameSpace(17)
Set CD=MyComp.ParseName("E:\")
Set Context=CD.Verbs
CD.InvokeVerb "E&ject"


'This line on are comments only
'Note if a letter is underlined you must insert an ampersand before it.
'Normally only the first line and the line below is needed for most verbs. Eject is different.
'objshell.ShellExecute "e:" ,,,"E&ject"
'object.ShellExecute(sFile [,vArguments] [,vDirectory] [,vOperation] [,vShow])



--
----------------------------------------------------------
War on the Pachyderms Terrorists
http://www.counterpunch.org/wilson09012004.html
"John Paul" <JohnPaul@discussions.microsoft.com> wrote in message news:7CB4135F-FF17-4FBA-A447-A125D11C6040@microsoft.com...
> Hi, Is there a way to make a shortcut or a vb script to open a CD drive. I
> know there are some programs that will do this but I'd rather not use
> another program.
>
>
> Thanks, John.
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

Thanks, David.

To make a close vbs do I just change the E&ject to somthing. I tried C&lose
but that didn't work.


Thanks, John.
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

You can't close it. Right click and try, nothing happens. You have to use a program to close a CD.

--
----------------------------------------------------------
War on the Pachyderms Terrorists
http://www.counterpunch.org/wilson09012004.html
"John Paul" <JohnPaul@discussions.microsoft.com> wrote in message news:15BE3FB5-A9D3-48B9-9CBE-11A70B0CE8DB@microsoft.com...
> Thanks, David.
>
> To make a close vbs do I just change the E&ject to somthing. I tried C&lose
> but that didn't work.
>
>
> Thanks, John.