Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Dell laptop using Windows 7 and am trying to write a script for Autohotkey to eject the CD-ROM drive but so far, no luck. Can someone help please. Thanks

share|improve this question
2  
Out of curiosity, is there some reason this has to be an autohotkey script? There may be easier ways of accomplishing what you're trying to do - what's the actual goal here? –  Shinrai Mar 20 '12 at 16:19
1  
If AutoHotKey supports doing Batch scripts, then you might find this previous question from SU to be of some help. –  qweet Mar 20 '12 at 16:29

1 Answer 1

up vote 2 down vote accepted

You can use the Drive command to eject an optical drive.

  • To eject the default drive:

    Drive, Eject
    
  • To eject a specific drive, use its drive letter (e.g. D:):

    Drive, Eject, D:
    
share|improve this answer
    
Drive, Eject, D: worked just fine. Many thanks. I wish I knew how to award points on here. –  Carlos Mar 20 '12 at 19:04
    
@Carlos, you can award points by clicking the upvote ▲ symbol and by accepting ✔ an answer. See this FAQ regarding accepting answers: meta.stackexchange.com/a/5235/172108 –  iglvzx Mar 21 '12 at 3:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.