Jump to content

Icon to open cd drive


rridgely

Recommended Posts

  • Moderators

Is their a way to make an icon that will open and close your cd rom drive? The way my pc's case is you cant close the cd drive with the button you can only open it with it (it has some kind of spring door thing in front of it). Well my pc has a dual layer dvd burner in it and I really dont want it to get broken being closed by hand.

Link to comment
Share on other sites

Is their a way to make an icon that will open and close your cd rom drive? The way my pc's case is you cant close the cd drive with the button you can only open it with it (it has some kind of spring door thing in front of it). Well my pc has a dual layer dvd burner in it and I really dont want it to get broken being closed by hand.

 

 

 

The button doesn't respond to being pressed for closing it..?

Link to comment
Share on other sites

  • Moderators

No the button on the drive works fine, but I can only open the drive with it and I have to actually push the drive in a little bit to close it, becuase the door over the drive flips down and blocks the button. The door over the drive has a button on that just pushes the one on the drive itself to open.

Link to comment
Share on other sites

No the button on the drive works fine, but I can only open the drive with it and I have to actually push the drive in a little bit to close it, becuase the door over the drive flips down and blocks the button. The door over the drive has a button on that just pushes the one on the drive itself to open.

 

 

 

Does it flip down in a loose way? If so you can just raise it a little and press the button.

Link to comment
Share on other sites

  • Moderators

Sorry Tarun I dont think I'm explaining what I'm trying to do very well.. This is the type of case my pc has: http://cgi.ebay.com/ws/eBayISAPI.dll?ViewI...5201798907&rd=1

its a picture of one on ebay not my actual pc.

 

You see how the cd drives are covered. well you can open it by pushing the button but once its open the button is covered so you have to manually push the drive a little in order for it to close(stupid desighn that I didnt notice till I bought it). I want to create an icon in my quick launch bar that can open and close the cdrom drive so I dont have to wory about pushing the drive to hard and breaking it.

Link to comment
Share on other sites

Here is a tool:http://www.cd-eject-tool.com/ Have to pay after trial. There are probably some free ones around.

If it isn't broke, tweak it.

Link to comment
Share on other sites

Nah don't bother with that....

I made a small program for you.

 

http://djlizard.net/cdtray.exe

 

Send it commands like:

cdtray.exe open D:

cdtray.exe close E:

 

It can't [yet] tell if a drive is already open or closed, so you have to send it the right command. If you REALLY want me to, I'll try to figure it out ;) (or you could just always manually open it, but use cdtray.exe to close it)

 

Oh and you have a very valid point about not wanting to push the drive back in by hand. It can wreak havoc on the treads and gears with each little push on the tray.

Click here if CCleaner Issues are re-appearing

 

DjLizard.net

DjLizard.net wiki

Dial-a-fix

Dial-a-fix tips

DjLizard.net software support forum

 

Do you live in Bradenton, Sarasota, Tampa, or St. Petersburg, Florida? Visit Digital Doctors where I work :)

Link to comment
Share on other sites

  • Moderators
Nah don't bother with that....

I made a small program for you.

 

http://djlizard.net/cdtray.exe

 

Send it commands like:

cdtray.exe open D:

cdtray.exe close E:

 

It can't [yet] tell if a drive is already open or closed, so you have to send it the right command.  If you REALLY want me to, I'll try to figure it out ;) (or you could just always manually open it, but use cdtray.exe to close it)

 

Oh and you have a very valid point about not wanting to push the drive back in by hand.  It can wreak havoc on the treads and gears with each little push on the tray.

 

 

 

 

Thank you so much! I need help though, I downloaded it and a black box flashes and goes away I cant type cdtray.exe.

Link to comment
Share on other sites

Yeah it's a command line program.

 

You put the program somewhere, then make a shortcut to it...

 

So you right click somewhere, new, shortcut, then you browse, point at cdtray.exe, then it makes a long string of the path and exe that has quotes around it... well OUTSIDE the quotes, you put the parameters.. for example, if your shortcut looked like:

"C:\windows\system32\cdtray.exe"

 

You'd change it to say

"C:\windows\system32\cdtray.exe" open D:

 

and hit next, and the shortcut wizard will then always send that command when you use that shortcut. You could name the shortcut CLOSE D DRIVE. You could even make the shortcut from inside of the quick launch folder (right click in a blank area of your quick launch toolbar and choose Open Folder, then make the shortcut in there).

 

I recommend putting cdtray.exe in C:\windows\system32

 

 

It's not PRETTY looking, but it could be if I spent more than 5 minutes coding it after reading your post ;)

Click here if CCleaner Issues are re-appearing

 

DjLizard.net

DjLizard.net wiki

Dial-a-fix

Dial-a-fix tips

DjLizard.net software support forum

 

Do you live in Bradenton, Sarasota, Tampa, or St. Petersburg, Florida? Visit Digital Doctors where I work :)

Link to comment
Share on other sites

the source (object pascal) :

 

 

program ejectcd;{$APPTYPE CONSOLE}uses SysUtils, MMSystem;var str, str2: string;begin if (ParamCount < 2) then halt; str := lowercase(trim(ParamStr(1))); str2 := 'open cdaudio!' + uppercase(trim(ParamStr(2))) + ' alias thedrive'; mciSendString(PAnsiChar(trim(str2)), nil, 0, 0); if (str = 'close') then mciSendString('set thedrive door closed wait', nil, 0, 0); if (str = 'open') then mciSendString('set thedrive door open wait', nil, 0, 0);end.

 

Click here if CCleaner Issues are re-appearing

 

DjLizard.net

DjLizard.net wiki

Dial-a-fix

Dial-a-fix tips

DjLizard.net software support forum

 

Do you live in Bradenton, Sarasota, Tampa, or St. Petersburg, Florida? Visit Digital Doctors where I work :)

Link to comment
Share on other sites

Somehow, I knew it would, that's why I posted the source. What you see above is the beauty of Pascal!

 

Now, that source is pretty nasty - no checking ANYWHERE (but you can't really screw it up with bad params anyway)) - and I could have made it toggle your tray (instead of needing explicit 'open'/'close') but I don't understand mci API yet. I looked it up to do this project, and I was like WTF. But Win32 API is pretty damn cool in general.

 

I learned Borland's version of Object Pascal with integrated editor -- Delphi -- in like 5 minutes. I already knew Borland's version of Pascal (specifically, Turbo Pascal 7) which ROCKED MY SOCKS when I was 15. Pascal, Delphi, Object Pascal... they're all so easy. They make sense, they promote stable, structured code, and they are strongly typed (i.e., "wordy") and are easy to read, and are usually pretty easy to figure out. The above was kinda hard to read because Win32 API is none of those things.

 

I've written several other programs, including:

Tarun's Hijack this Converter - his first version was Visual Basic, and I ported it to Delphi in 48 hours (having not known Visual Basic (at all!), about two weeks of casual Delphi, and obviously not working on it for 48 straight hours) - I did it as an exercise and an example : A) I needed to learn Delphi and had nothing to program, no good ideas, and, B) I wanted to show Tarun how impressive Delphi is, and how fast you can learn it. I figured it'd be good if he learned Delphi using his own program. He's been updating the source ever since.

 

The Digital Doctor: a specialized program used on my Tech CD as an interface to the installation and launching of hundreds of tricks and programs. -- ongoing, private, proprietary, and closed-source

 

Dial-a-fix: a program which can fix a couple dozen 'known-issues', and can automate the installation or repair of several Windows-critical services (windows installer, windows update automatic update, cryptography service, etc etc) -- ongoing, public, and closed-source (current build's always at - http://djlizard.net/daf.exe) -- ("supporting" files not yet uploaded, but they will be at http://djlizard.net/daf/ when I get a chance)

 

and a few odds and ends for my family (Nessa's Calendar - low code, mostly form properties -- it's just a Delphi MonthCalendar(ComCtls) component)

 

oh, I made a secure shredder program (and DLL) that I was going to show MrG, to possibly wring CCleaner's found files through. I'm not sure if A) it works well (seems to work fine here, but I haven't wrung thousands of junk files through it like CCleaner would) and B) if it's fast enough, etc) so I haven't really opted to show it to him yet ;)

Click here if CCleaner Issues are re-appearing

 

DjLizard.net

DjLizard.net wiki

Dial-a-fix

Dial-a-fix tips

DjLizard.net software support forum

 

Do you live in Bradenton, Sarasota, Tampa, or St. Petersburg, Florida? Visit Digital Doctors where I work :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.