#1
Can anyone please tell me the command prompt command to make the CD/DVD tray open/close. I think it would be funny to have it open and close repeatedly 100 times after sending it to someone.

Heres the code to open, but it doesn't work on my dvd drive, but worked at the school's CD. I got this from a website:

"for all you people who want to know how to open the cd tray or keep asking open notepad and copy and paste this then save as .vbs"

Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection
if colCDROMs.Count >= 1 then
colCDROMs.Item(i).eject
Set oWMP = Nothing
Set colCDROMs = Nothing
End If

WScript.Quit
#2
You actually copy pasted that into notepad, changed the extension of the file from .txt to .vbs, and expected it to open your cd tray?
Dear God, do you actually answer prayers?

Yes, but only in a way indistinguishable from random luck or the result of your own efforts.
#3
Batch files where fun at school. Disguesing them as games and putting them on pupilsave was a right laugh. Especially when it would repeatedly open the batch file again and again forcing the user to shutdown .
#4
Quote by Mad Marius
You actually copy pasted that into notepad, changed the extension of the file from .txt to .vbs, and expected it to open your cd tray?


Yes, that is what he said.
#6
what site did you get it from?
Governor of the Jersey Rocks group
PM me to join
#7
I'm sure there is a .bat version of that.

WIll be something like

Debug

Memory number FFFF
Quote by Tyson2011
d von is truly one of the pit.


Quote by 09phillt
Good God Man What's Wrong With You!?
#8
Quote by Mad Marius
You actually copy pasted that into notepad, changed the extension of the file from .txt to .vbs, and expected it to open your cd tray?


um. yes? It worked at the school, and on my friend's computer. But now whenever I open one of these, the text file comes up, its wierd.
#9
Quote by Johnny83191
um. yes? It worked at the school, and on my friend's computer. But now whenever I open one of these, the text file comes up, its wierd.


tools -> folder options -> view -> uncheck "hide extensions for known filetypes"

as the file maybe very well still be eject.vbs.txt
#10
Quote by Gmp211
what site did you get it from?

...well?
Governor of the Jersey Rocks group
PM me to join
#11
Quote by Johnny83191
um. yes? It worked at the school, and on my friend's computer. But now whenever I open one of these, the text file comes up, its wierd.


Doesn't work for me. Who still uses Visual Basic anyways?

And the reason it opens up as a text file is probably because file extensions are hidden on your computer, and the file is actually named yourName.vbs.txt.
Dear God, do you actually answer prayers?

Yes, but only in a way indistinguishable from random luck or the result of your own efforts.
#12
Quote by Mad Marius
Doesn't work for me. Who still uses Visual Basic anyways?

And the reason it opens up as a text file is probably because file extensions are hidden on your computer, and the file is actually named yourName.vbs.txt.

VB and VB.NET are still widely used...I've actually written a nice CSR/event tracking application in VB that ties into an Access database.
#13
Quote by denizenz
VB and VB.NET are still widely used...I've actually written a nice CSR/event tracking application in VB that ties into an Access database.


I was gonna ask who still uses Access, but nevermind.

To use a popular and mildly stupid expression on these forums, C "for the win".
Dear God, do you actually answer prayers?

Yes, but only in a way indistinguishable from random luck or the result of your own efforts.
#14
Quote by Mad Marius
I was gonna ask who still uses Access, but nevermind.

To use a popular and mildly stupid expression on these forums, C "for the win".

Blah...I downloaded SQL but Access works fine for what I'm doing. Seriously though VB is huge especially for scripting such as logon scripts for Windows networks.
#15
Quote by Mad Marius
I was gonna ask who still uses Access, but nevermind.

To use a popular and mildly stupid expression on these forums, C "for the win".


as far as stupid database stuff goes, perl "for teh win"


actually, its the only language I know ...but I'll be learning javascript soon ( ) as well as C (for microcontrollers and stuff )
Last edited by seljer at Sep 13, 2007,
#18
Quote by Johnny83191
I forget, It was a reply to some question on a forum though. Thanks for the file hiding, but where do I get to tools?


in the my computer/explorer thing
#19
Quote by denizenz
Blah...I downloaded SQL

SQL is a language not an application.



And I pwn at it and PL/SQL.
#20
Quote by Bluesbreaker7
SQL is a language not an application.



And I pwn at it and PL/SQL.

Access is MS's database software
#22
wow i havnt even heard of any of these before lol
<Raven> I got so baked last night
<Raven> that I WOKE UP high o_o
<Raven> Do you have any idea how euphoric that is?
<Raven> I felt like I was being born.
#23
Quote by Bluesbreaker7
Yes, when did I say it wasn't?


eh
to me it appeared evident that "downloaded SQL" means "downloaded some SQL compatible database program......which would most likely happen to be MySQL"
#25
Quote by slash-120
is there a code you can put in to open the disc drive?

or is it not that simple


Dude, you just hit Alt + F4, it ain't rocket science.
Dear God, do you actually answer prayers?

Yes, but only in a way indistinguishable from random luck or the result of your own efforts.
#27
...because I'm sure copy/pasting script that you have no clue about into you CMD prompt is a clever idea...
#28
Quote by umop-3p!sdn
...because I'm sure copy/pasting script that you have no clue about into you CMD prompt is a clever idea...


eh, its nothing that ingenious
it calls up on WMP, checks if theres a CD drive, the tells it to open
#29
wait im confused.

someone pm me the code that makes it open and close.

that code only makes it open. :/

also

C++ FTW!
Sig space for rent.
$100 obo
Message for negotiaton.
#30
Quote by seljer
eh, its nothing that ingenious
it calls up on WMP, checks if theres a CD drive, the tells it to open

Ah, I guess I didnt reafd the OP properly. I thought he was asking for scripts...
#31
Quote by Mad Marius
I was gonna ask who still uses Access, but nevermind.

To use a popular and mildly stupid expression on these forums, C "for the win".

I use Access.
#32
MySQL ftw. PHP kicks balls.

Not in this situation however. Let's get into assembly! w0t.
My name is Marc! Silly username.
#33
Quote by NemesisX
MySQL ftw. PHP kicks balls.

Not in this situation however. Let's get into assembly! w0t.

d40us		=	15	
ONE_MS		=	167	
FIVE_MS		=	835
TEN_MS		=	1670

PORTF   	=	0x1403

;STACK		=	0x8FFF

REG_SEL		=	0x01	
ENABLE		=   0x02
NOT_REG_SEL	=	0xFE
NOT_ENABLE	=   0xFD
NOT_RESET   =   0xF7     

LCDimg		=	pfimg
LCD_RSimg	=	pfimg
LCD_ENimg	=	pfimg

LCD		=	PORTF
LCD_RS	=	PORTF
LCD_EN	=	PORTF


;variables
.section .bss
temp1:		.rmb	1
pfimg:		.rmb	1
reset_seq:	.rmb	1
disp_ram:	.rmb	3


.section .rodata
inidsp1:	.fcb	2		
			.fcb	0x33		
			.fcb	0x32		
inidsp2:	.fcb	4		
			.fcb	0x28   		
			.fcb	0x06		
			.fcb	0x0c		
			.fcb	0x01		

.section .text


.global LCD_INI
LCD_INI: 	psha
			pshx
			clra
			staa	pfimg
			staa	PORTF
		    ldx		#inidsp1   	
			ldaa	#1
			staa	reset_seq	
		    jsr    	outins1    	
		    ldx		#inidsp2   	
			clr		reset_seq
		    jsr    	outins2    	
		    pulx
		    pula
			rts
			
outins1:	pshb         		
		    jsr    	sel_inst	
			ldab   	0,x
		    inx
		       	
onext1:		ldaa   	0,x
	       	jsr    	wrt_pulse    	
	       	inx
			jsr	d5ms
	       	decb
	       	bne    	onext1
	       	pulb
	       	rts

outins2:	pshb            	
		   	jsr    	sel_inst
		   	ldab   	0,x
		   	inx
onext2:		ldaa   	0,x
	       	jsr    	wrt_pulse    	
	       	inx
	       	decb
	       	bne    	onext2
			jsr	d5ms
	       	pulb
	       	rts

delay_10ms:
d10ms:  	pshx
			ldx     #TEN_MS
		  	bsr	del1
		  	pulx
			rts
			
d5ms:   	pshx
			ldx     #FIVE_MS
		  	bsr	del1
			pulx
			rts
			
del1:		dex
			inx
			dex
			bne	del1
			rts


sel_data:	psha
			ldaa	LCD_RSimg
			oraa	#REG_SEL
			bra	sel_i
			
sel_inst:	psha
			ldaa	LCD_RSimg
			anda	#NOT_REG_SEL
sel_i:		staa	LCD_RSimg
			anda    #NOT_RESET              
			staa	LCD_RS
			pula
		    rts

wrt_pulse:	pshx
	       	psha        			
	       	anda   	#0xf0     		
	       	staa   	temp1 			
	       	ldaa   	LCDimg    		
	       	anda   	#0x0f     		
	       	oraa   	temp1    		
	       	staa   	LCDimg    		
	       	anda    #NOT_RESET              
			staa   	LCD    			
			bsr		enable_pulse
			ldaa	reset_seq
			beq		wrtpls
			jsr		d5ms			

wrtpls:		pula
		 	asla            		
			asla
		    asla
		    asla
		    staa   	temp1			
		    ldaa   	LCDimg 			
		    anda   	#0x0f   			
		    oraa   	temp1  			
		    staa   	LCDimg    		
		    anda    #NOT_RESET              
			staa   	LCD    			
			bsr		enable_pulse
			pulx
		    rts
*
enable_pulse:
			ldaa	LCD_ENimg
			oraa	#ENABLE
			staa	LCD_ENimg
			anda    #NOT_RESET              
			staa	LCD_EN
			ldaa	LCD_ENimg
			anda	#NOT_ENABLE
			staa	LCD_ENimg
			anda    #NOT_RESET              
			staa	LCD_EN
			pshx
			ldx     #d40us
		  	jsr		del1
			pulx
			rts

.global LCD_LINE1
LCD_LINE1:	
		psha
		pshb
		pshx
		jsr    	sel_inst		
       	ldaa   	#0x80     		
       	jsr    	wrt_pulse
       	jsr    	sel_data		
		;ldx    	#MSG1			
        ;ldab    #16                     
		jsr	msg_out
		pulx
		pulb
		pula
		rts	

.global LCD_LINE2
LCD_LINE2:	
		psha
		pshb
		pshx
		jsr    	sel_inst
       	ldaa   	#0xC0     		
       	jsr    	wrt_pulse
       	jsr    	sel_data
		;ldx    	#MSG2			
        ;ldab    #16                     
		jsr	msg_out
		pulx
		pulb
		pula
		rts	

      
msg_out:
		ldaa   	0,x
       	jsr    	wrt_pulse
       	inx
       	decb
       	bne    	msg_out
		rts
#34
Copy and paste this into notepad

Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection
if colCDROMs.Count >= 1 then
colCDROMs.Item(i).eject
Set oWMP = Nothing
Set colCDROMs = Nothing
End If

WScript.Quit


Save as cd.vbs

Open notepad again, and copy and paste this into it.

@echo off
cd.vbs
@echo CUPHOLDER!
PAUSE


Save it as anything.bat

Now run anything.bat.