Wednesday, September 29, 2010

Add to drive "off" command


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.






相关链接:



Training Into The Domestic Game Breakthrough



Details of the Four strokes to start upgrading the efficiency of Thunder Download



Reviews Accounting And Finance



MTS to MP4



FLV To iPod



Photoshop CS Play Magic, Making The Mysterious Eye Of The



Exception Handling in C # (1)



Citrix Appoints CAO Heng Kang as vice president and general manager of Greater China



Chinese CN domain names registered by the end of lift height



Focus On The Family 3



Effective process improvement method must contain the elements



Fax Tools Report



P2P affected 90% of operator revenue flow erosion



H.264 to AVI



No comments:

Post a Comment