Add a "close" command to the drive

  

Computer shop news I don't know why, in Microsoft's current operating system, the command menu of the CD-ROM drive is only the "Pop-up" command, there is no "Close" command. If we don't want to press the button of the optical drive to close the ejected tray, we have to rely on the installation of third-party software. In fact, we can also make up for this deficiency with VBScript statements.
Turn off all optical drives If you have more than one optical drive installed in your system, open Notepad and enter the following code: Setwmp=CreateObject(WMPlayer.OCX.7) Setcdrom=wmp.cdromCollection Ifcdrom.Count=1then' The sentence is used to determine how many optical drives are installed in your system. Forz=0tocdrom.Count-1 cdrom.Item(z).Eject Next Forz=0tocdrom.Count-1 cdrom.Item(z).Eject Next EndI Note the file After changing the type to "all files", save the file as "close all .vbe", create a shortcut for the file on the desktop, and then double-click the shortcut on the desktop to close all the ejected CD-ROM drives. Closing the specified CD-ROM drive The following statement allows you to close the specified CD-ROM drive. For example, to close the first CD-ROM drive, we can create a new text file and enter the following code: Setwmp=CreateObject(WMPlayer.OCX.7) Setcdrom=wmp.cdromCollection cdrom .Item(0).Eject Also save the file as a file with the suffix VBE, named "ld1.vbe", and double-click the file to close the first CD-ROM drive letter in your system. In the above statement, “0” in item(0) represents the first CD-ROM drive letter. If you want to close the second CD-ROM drive letter, please add 1 to the "0” here, and so on. The implementation turns off the specified drive letter. We can also add “close" to the right-click menu of the CD-ROM drive. To do this, expand the [HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Drive\\shell] branch in the Registry Editor, and then create a new “CloseCDROM” branch in the right window. After entering the partition, double-click on the right window to “Default&rdquo ;, change its default value to “ close all & rdquo;; then click “ edit & rarquo; new & rarr; item & rdquo;, rename the new key to "command", change the "default" value to "ld" ;C:\\WINDOWS\\System32\\WScript.exeC:\\Close all .vbe” (here you want to change C:\\ to "ld." Close all .vbe” files saved in your system). In the same way, you can add the command to close the specified CD-ROM to the right-click menu of the CD-ROM drive. After the modification is completed, close the registry and you can find the command to close all ” and close the specified drive letter in the right-click menu.

Copyright © Windows knowledge All Rights Reserved