vbs让光驱弹出,关闭
==============code=start============================
ON ERROR RESUME NEXT
Set wmp = CreateObject("WMPlayer.OCX.7")
Set cdrom = wmp.cdromCollection
If cdrom.Count >= 1 then '(该句用来判断你的系统中装了多少个光驱)
For z = 0 to cdrom.Count - 1
cdrom.Item(z).eject
Next
For z = 0 to cdrom.Count - 1
cdrom.Item(z).eject
Next
End If
===========code=end=================================
==============code=start============================
ON ERROR RESUME NEXT
Set wmp = CreateObject("WMPlayer.OCX.7")
Set cdrom = wmp.cdromCollection
If cdrom.Count >= 1 then '(该句用来判断你的系统中装了多少个光驱)
For z = 0 to cdrom.Count - 1
cdrom.Item(z).eject
Next
For z = 0 to cdrom.Count - 1
cdrom.Item(z).eject
Next
End If
===========code=end=================================