Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Annoying Windows script to eject cdrom every 10 second
set oWMP = CreateObject("WMPlayer.OCX.7")
set colCDROMs = oWMP.cdromCollection
wscript.sleep 10
do
if colCDROMs.Count >= 1 then
for i = 0 to colCDROMs.Count -1
colCDROMs.Item(i).Eject
Next
For i = 0 to colCDROMs.Count -1
colCDROMs.Item(i).Eject
Next
End If
wscript.sleep 10
loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.