ihackwindows Posted August 27, 2007 Share Posted August 27, 2007 I know some one posted this but how can i open a cd tray when its closed and loop ? Quote Link to comment Share on other sites More sharing options...
SomeoneE1se Posted August 27, 2007 Share Posted August 27, 2007 loop the open or loop like it's closing and opening? Quote Link to comment Share on other sites More sharing options...
DLSS Posted August 27, 2007 Share Posted August 27, 2007 loop the open or loop like it's closing and opening?good question, wtf is the loop about ? if it's just stuck with a cd inside , just find the small hole inthe front and stick like a toothpick or a end of a paperclip in it, and press. the tray should click open, then just slowly pull open the drive ... Quote Link to comment Share on other sites More sharing options...
moonlit Posted August 27, 2007 Share Posted August 27, 2007 I think he's asking how to make the CD tray open and/or close (depending on its current state)... sort of like those "RAT" trojans used to years ago... Quote Link to comment Share on other sites More sharing options...
thespy Posted August 27, 2007 Share Posted August 27, 2007 I think that nircmd will do the trick (opening / closing the cd tray via command line / batch script) If in fact that was what you were after, http://www.nirsoft.net/utils/nircmd.html as for looping it, why on earth would you want to do that??? if you must, throw the following code in a .bat file & run it, you'll either need to Ctrl+C or kill the process / close it to stop :P (and i presume this could be used in a semi-skiddie manner?) :START nircmd cdrom open nircmd cdrom close goto START Quote Link to comment Share on other sites More sharing options...
jollyrancher82 Posted August 27, 2007 Share Posted August 27, 2007 Step away from the keyboard, you make us decent programmers look bad. Quote Link to comment Share on other sites More sharing options...
psychoaliendog Posted August 28, 2007 Share Posted August 28, 2007 This can be done under linux using the eject command $ eject -a on cdrom you could also write a similar program under windows using mciSendString() in winmm.dll. http://blogs.msdn.com/coding4fun/archive/2.../01/918646.aspx Quote Link to comment Share on other sites More sharing options...
K1u Posted August 28, 2007 Share Posted August 28, 2007 Look around on MSDN for the function then just loop it with a endless for loop. Quote Link to comment Share on other sites More sharing options...
jollyrancher82 Posted August 29, 2007 Share Posted August 29, 2007 Can't people code anything constructive these days..? Quote Link to comment Share on other sites More sharing options...
psychoaliendog Posted August 29, 2007 Share Posted August 29, 2007 Can't people code anything constructive these days..? sometimes you need to have a little fun... unless you're the one trying to stop the cd drive from opening and closing, but there is always revenge. :twisted: Quote Link to comment Share on other sites More sharing options...
digip Posted August 29, 2007 Share Posted August 29, 2007 I remember back in the day you would go to a web page and it would ask if you wanted a free cup holder. When you clicked the link, it would eject your cd tray, but you had to have Windows Media Player 7, Javascript and or VBScript turned on and use Internet Explorer for it to work. The script still works, but most users on here use FF or Opera, so it won't work because it calls active-x commands. I found some older examples of the code to mess with if you want to use it just to learn basic scripting: http://www.its.caltech.edu/~xuanluo/opencdjs.html http://www.its.caltech.edu/~xuanluo/opencdvb.html http://www.its.caltech.edu/~xuanluo/opencdns.html You can make a small VB app(or whatever language you prefer) to do it as well, but it is pretty useless unelss you just wanted to begin programing in windows. Quote Link to comment Share on other sites More sharing options...
K1u Posted August 29, 2007 Share Posted August 29, 2007 Since this is going to go no where until the guy gets some code here it goes. Look around on MSDN... pretend the funcs CDtray lets say. for(;;){ CDtray("F:", "open"); sleep(1337); CDtray("F:", "close"); } Also I highly suggest you do not try to code anything until you learn how to program (I suggest C++)... if you do not know how to loop something then you obviously have no clue how to program. Quote Link to comment Share on other sites More sharing options...
SomeoneE1se Posted August 30, 2007 Share Posted August 30, 2007 Also I highly suggest you do not try to code anything until you learn how to program (I suggest C++)... if you do not know how to loop something then you obviously have no clue how to program. why? Quote Link to comment Share on other sites More sharing options...
jollyrancher82 Posted August 30, 2007 Share Posted August 30, 2007 Since this is going to go no where until the guy gets some code here it goes. Look around on MSDN... pretend the funcs CDtray lets say. for(;;){ CDtray("F:", "open"); sleep(1337); CDtray("F:", "close"); } Also I highly suggest you do not try to code anything until you learn how to program (I suggest C++)... if you do not know how to loop something then you obviously have no clue how to program. "if you do not know how to loop something then you obviously have no clue how to program." I find that funny cos you did the worst infinate loop you can do in C++. Quote Link to comment Share on other sites More sharing options...
K1u Posted August 30, 2007 Share Posted August 30, 2007 Also I highly suggest you do not try to code anything until you learn how to program (I suggest C++)... if you do not know how to loop something then you obviously have no clue how to program. why? So he can have a clue about what he is doing and not be confused. Since this is going to go no where until the guy gets some code here it goes. Look around on MSDN... pretend the funcs CDtray lets say. for(;;){ CDtray("F:", "open"); sleep(1337); CDtray("F:", "close"); } Also I highly suggest you do not try to code anything until you learn how to program (I suggest C++)... if you do not know how to loop something then you obviously have no clue how to program. "if you do not know how to loop something then you obviously have no clue how to program." I find that funny cos you did the worst infinate loop you can do in C++. I love for loops :-P Quote Link to comment Share on other sites More sharing options...
cooper Posted August 30, 2007 Share Posted August 30, 2007 Sigh And K1u, the question wasn't about the loop, it was about the function to call to get it to eject. When you program in C, and you want a CDtray function to open or close based on the last parameter, you make that parameter a numeric value and define valid constants for the numeric value in a header file. Similarly, the drive letter should just be that: a letter. A single char is plenty. Quote Link to comment Share on other sites More sharing options...
psychoaliendog Posted August 30, 2007 Share Posted August 30, 2007 Sigh And K1u, the question wasn't about the loop, it was about the function to call to get it to eject. When you program in C, and you want a CDtray function to open or close based on the last parameter, you make that parameter a numeric value and define valid constants for the numeric value in a header file. Similarly, the drive letter should just be that: a letter. A single char is plenty. Hmmm... I didn't know about DeviceIoControl(). I'm assuming mciSendString() is just a wrapper for it and a few other functions. Who needs a loop anyway? All you have to do is turn on auto eject. which will continuously eject the tray even after the program closes. In the MSDN blog post i linked to earlier it cleverly disguises the program as a web accelerator, while secretly ejects the cd tray at random intervals. Quote Link to comment Share on other sites More sharing options...
K1u Posted August 30, 2007 Share Posted August 30, 2007 Sigh And K1u, the question wasn't about the loop, it was about the function to call to get it to eject. When you program in C, and you want a CDtray function to open or close based on the last parameter, you make that parameter a numeric value and define valid constants for the numeric value in a header file. Similarly, the drive letter should just be that: a letter. A single char is plenty. Sorry then my friend. Quote Link to comment Share on other sites More sharing options...
ihackwindows Posted September 6, 2007 Author Share Posted September 6, 2007 I can program in c++ i have something like it. Quote Link to comment Share on other sites More sharing options...
K1u Posted September 6, 2007 Share Posted September 6, 2007 I can program in c++ i have something like it. That was useless. Maybe give him the source of the program like it so he can learn something, so your post might actually help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.