Powered by GeSHi

Source code for cdeject.ps1

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

  1. param( [string] $help )
  2.  
  3. if ( $help -eq "" ) {
  4. 	$colCDROMs = ( new-object -COM WMPlayer.OCX.7 ).cdromCollection
  5. 	for ( $i = 0; $i -lt $colCDROMs.count ; $i++ ) { $colCDROMs.Item( $i ).eject( ) }
  6. }
  7. else {
  8. 	write-host
  9. 	write-host "CDEject.ps1, Version 1.00"
  10. 	write-host "Eject all CDROMs"
  11. 	write-host
  12. 	write-host "Needs Windows Media Player installed"
  13. 	write-host
  14. 	write-host "Based on VBScript code posted by Christoph Fricke on"
  15. 	write-host "the microsoft.public.de.german.scripting.wsh newsgroup"
  16. 	write-host
  17. 	write-host "Written by Rob van der Woude"
  18. 	write-host "http://www.robvanderwoude.com"
  19. 	write-host
  20. }
  21.