I do not know why, in Microsoft's current operating system, the drive menu commands are only the "pop" command, there is no "off" command. If we do not want to press the button to close the pop-up drive tray, you had to rely on third-party software to achieve. In fact, we can also use VBScript to make up for this lack of statement.
Close all drives
If your system is installed on more than one drive, then open Notepad, enter the following code:
Set wmp = CreateObject ("WMPlayer.OCX.7")
Set cdrom = wmp.cdromCollection
If cdrom.Count> = 1 then''(the words are installed with your system to determine how many CD-ROM)
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
Note that the file type to "All Files", it will save the file to "close all. Vbe", the desktop shortcut for the file to build a future double-click the shortcut on the desktop can turn off all pop-up drive.
Close the specified drive
The following statements allow you to turn off the specified drive, for example, to turn off the first drive, we were a new text file, enter the following code:
Set wmp = CreateObject ("WMPlayer.OCX.7")
Set cdrom = wmp.cdromCollection
cdrom.Item (0). Eject
Save the file to the same suffix as the VBE file, named "close1.vbe", after the double click the file to turn off your system drive letter first. In the above statement in, item (0) in the "0" represents the first drive letter, if you want to turn off the second drive letter, please here "0" plus 1, and so on, can be specified to achieve close The letter was.
We can also "close" to the drive context menu. Is in the Registry Editor, expand [HKEY_LOCAL_MACHINE
SOFTWAREClassesDriveshell] branch, and then in the right window, the new "CloseCDROM" branch, into the partition, in the right window, double-click the "Default", its default value changed to "close all"; then click the "Edit 鈫?New 鈫?Item" , rename the new key "command", the "default" value was revised to "C: WINDOWSSystem32WScript.exe C: Close all. vbe" (where you want to C: to "close all. vbe" file in your system Save the path).
The same method can be used to close specified CD-ROM drive in the right order to join the menu. After changes, close the Registry can be found in the context menu "Close all" and close the selected drive letter of the command.
相关链接:
Easy Converters And Optimizers
Flash to MPEG
Catalogs Security And Privacy:
JMP statistical quality Training to build high-end beats China
DVR-MS to MPG
overall budget management of domestic software
SWF to MP4
Intermediate Hospital "backward" Sample
Let my MAILBOX, "all set" to complete easy collection
Spring Festival Travel, Then The Insurance
Softbank and IDG WITHDRAW money than the VC who is the next cash cow
Modern SHIPBUILDING process
Meiling: Select Game Gu Gu And Back
Using CSS 3 brings us to the NEXT high