Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


cd in

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,32029
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> cd in
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 cd in - 3/8/2006 1:31:30 AM   
  thelorden

 

Posts: 2
Score: 0
Joined: 3/8/2006
Status: offline
Original message moved by Country73
Reason : Moved to correct forum
i would like a script which gets my cd player to go in. made one who got it to go out.....
 
 
Post #: 1
 
 RE: cd in - 3/8/2006 2:46:20 AM   
  ebgreen


Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
What happens if you just do the command to eject again?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to thelorden)
 
 
Post #: 2
 
 RE: cd in - 3/8/2006 3:34:25 AM   
  DiGiTAL.SkReAM


Posts: 1193
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
quote:

ORIGINAL: ebgreen

What happens if you just do the command to eject again?


I would think that it would de-ejectify?  Disejectalize?  Perform antiejectalization?

_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: cd in - 3/8/2006 7:29:51 AM   
  thelorden

 

Posts: 2
Score: 0
Joined: 3/8/2006
Status: offline
nothing. but is it anyoen who knows how to perform such script?

(in reply to ebgreen)
 
 
Post #: 4
 
 RE: cd in - 3/8/2006 7:38:44 AM   
  ebgreen


Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
The only postings that I saw in a quick search of the net suggested re-ejecting to close. Could you post the code that you have so far?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to thelorden)
 
 
Post #: 5
 
 RE: cd in - 3/8/2006 7:48:19 AM   
  ebgreen


Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
See if this helps:

Dim oATO : Set oATO = WScript.CreateObject("wshAPIToolkitObject.ucATO", "")

Const ssfDRIVES = &H11  ' namespace constant (drives folder = 17)...
Const cdromDrvLtr = "G:\"  ' specify your cd-rom drive letter...

Set oSH = CreateObject("Shell.Application")

' close cd-rom drawer...
nRtn = oATO.CallAPI("WINMM.DLL", "mciSendStringA", "Set CDAudio door
closed", 0, 0, 0)

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to ebgreen)
 
 
Post #: 6
 
 RE: cd in - 3/9/2006 12:33:15 AM   
  mbouchard


Posts: 1922
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
quote:

ORIGINAL: ebgreen
Dim oATO : Set oATO = WScript.CreateObject("wshAPIToolkitObject.ucATO", "")


Unless you can find the wshAPIToolkit component I don't think that the above would work.  I did a quick search and came across a cmd line tool called Eject that can open and close the CD tray.  Take a look here Http://www.cmdtools.com/ for the tool.

I have a script to open the CD but have not been successful in closing it.



      

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to ebgreen)
 
 
Post #: 7
 
 RE: cd in - 3/9/2006 1:21:09 AM   
  ebgreen


Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
Ehhh...sometimes I am too rushed to really read code that I find. My apologies for providing a somewhat flawed example. 

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to mbouchard)
 
 
Post #: 8
 
 RE: cd in - 3/9/2006 1:29:48 AM   
  mbouchard


Posts: 1922
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
quote:

ORIGINAL: ebgreen

Ehhh...sometimes I am too rushed to really read code that I find. My apologies for providing a somewhat flawed example. 


We will forgive you, this time....  Never let it happen again.

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to ebgreen)
 
 
Post #: 9
 
 RE: cd in - 3/9/2006 3:16:49 AM   
  ginolard


Posts: 1082
Score: 21
Joined: 8/10/2005
Status: offline
You could try using this tool via the Run method of the Shell object.

http://www.nirsoft.net/utils/nircmd.html

Not only can it open/close the CD drive (even on remote machines - ho what fun!) but it can do a whole heap more.

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to mbouchard)
 
 
Post #: 10
 
 RE: cd in - 3/9/2006 3:24:24 AM   
  ebgreen


Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
That is a nice looking util.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to ginolard)
 
 
Post #: 11
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> cd in Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts