> Open Notepad.
1. Set creatingwscript = WScript.CreateObject("wscript.Shell")
2. Set play = CreateObject("WMPlayer.ocx")
3. play.cdromCollection.item(0).Eject()
> How it Works ?
> First create an Object using wscript as "wscript.Shell" as parameter.
> Set it with any Object name here i used creatingwscript.
> And again create another one Object "WMPlayer.ocx".
> Set another one Object name here i have used play.
> Call the method [cdrom.Collection.item(0).Eject() using play Object.
> item(Here 0 is used because only one tray is present in laptops).
> Copy the Following VS code.
> Save the File as (Any name).vbs format [ Eg: open_cd_tray.vbs ]
2. Set play = CreateObject("WMPlayer.ocx")
3. play.cdromCollection.item(0).Eject()
> How it Works ?
> First create an Object using wscript as "wscript.Shell" as parameter.
> Set it with any Object name here i used creatingwscript.
> And again create another one Object "WMPlayer.ocx".
> Set another one Object name here i have used play.
> Call the method [cdrom.Collection.item(0).Eject() using play Object.
> item(Here 0 is used because only one tray is present in laptops).
No comments:
Post a Comment