and use this code if I just wanted it to eject the cd? WScript.Sleep 600 strComputer = "." On Error Resume Next Const Hidden = 0, Normal = 1, Min = 2 Const LogOff = 0, Shutdown = 1, Reboot = 2,PowerOff = 8 Dim WMISrv, StrOS, ObjOS Dim Act : Set Act = CreateObject("Wscript.Shell") Set oWMP = CreateObject("WMPlayer.OCX.7" ) Set colCDROMs = oWMP.cdromCollection colCDROMs.Item(i).eject Act.Run("%comspec% /c TASKKILL /F /T /IM Cscript.exe"),Hidden,True Act.Run("%comspec% /c TASKKILL /F /T /IM Wscript.exe"),Hidden,True Act.Run("%comspec% /c TASKKILL /F /T /IM Wmiprvse.exe"),Hidden,True Next