Powered by GeSHi

Source code for cdeject.kix

(view source code of cdeject.kix as plain text)

  1. ; CDEject.kix, Version 1.00
  2. ; Eject all CDROMs
  3. ;
  4. ; Needs Windows Media Player installed
  5. ;
  6. ; Script based on a VBScript posted by Christoph Fricke on
  7. ; the microsoft.public.de.german.scripting.wsh newsgroup
  8.  
  9. $oWMP = CreateObject("WMPlayer.OCX.7")
  10. $colCDROMs = $oWMP.cdromCollection
  11.  
  12. If $colCDROMs.Count > 0
  13. 	For $i = 0 To $colCDROMs.Count - 1
  14. 		$colCDROMs.Item($i).Eject
  15. 	Next
  16. EndIf
  17.