Mostrando postagens com marcador Windows. Mostrar todas as postagens
Mostrando postagens com marcador Windows. Mostrar todas as postagens

sexta-feira, 17 de abril de 2009

Comando para ejetar e fechar cd rom

Windows already includes the Eject command in the context menu for optical drives. If you want to add the Close Tray option in the context menu for optical drives, then this article is for you.

NirCmd is a small command-line utility written by Nir Sofer that allows you to do some useful tasks without displaying any user interface. By running NirCmd with simple command-line option, you can write and delete values and keys in the Registry, write values into INI file, dial to your internet account or connect to a VPN network, restart windows or shut down the computer, create shortcut to a file, change the created/modified date of a file, change your display settings, turn off your monitor, open the door of your CD-ROM drive, and more…

Shortcuts to Eject / Close CD/DVD Drive

Download Nircmd.zip from Nirsoft.net, unzip and extract the files to a folder. Move the file nircmd.exe to your Windows directory. To create a desktop shortcut to eject the CD/DVD drive tray, use the following command:

nircmd.exe cdrom open drive:

Assuming that F: is the drive-letter for your CD/DVD drive, you use the following command:

nircmd.exe cdrom open F:

As you guessed it right, the command for closing the drive tray is:

nircmd.exe cdrom close F:

Fig 1: Desktop shortcuts to open and close CD drive.

Tip: You may customize the icon the shortcuts accordingly. Browse through shell32.dll using the Change Icon dialog, and pick the CD/DVD icon. (Icon index #11)

Add "Close Tray" option to the context menu

To add a Close Tray entry to the right-click menu of CD/DVD drives, use these steps:

1. Download closetray.zip and save to Desktop

2. Unzip the files and extract the contents to a folder

3. Double-click closetray.reg to run it.

Fig 2: Close Tray option in the context menu

The Close Tray option will now appear for all optical drives connected to the system. Note that there is also a undo REG file available in the Zip, just in case you want to remove Close Tray option from the right click menu.

Editor’s note: The above is just one of the many tasks that NirCMD can automate. Read the NirCMD help file to know the other uses of this excellent tool! And NirCMD is just one of the many helpful tools produced by Nir Sofer.


Mudar o Sidebar do File / Open do Windows

Customize Places Bar - Adicionar atalhos


If you have Windows ME/2000/XP/2003, you've probably noticed that in all system applications, the Open dialog box has a new UI element. Along the left side, you have a vertical toolbar with buttons pointing to frequently used folders. This toolbar is called the Places Bar. By default, the Places Bar contains links to History, My Documents, Desktop, My Computer, and My Network Places. You can change these links.


Method 1 - Registry Editor (regedit.exe or regedt32.exe)

Open Registry Editor and navigate to: 

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\comdlg32\Placesbar


You won't see this subkey in the registry editor. By default the Placesbar key is not present. You can to create this subkey, the OS recognizes and supports it.


Inside the "PlacesBar" key, you must create 5 entries: Place0, Place1, Place2, Place3, Place4. 

Place0 corresponds to the first entry, Place1 corresponds to the second entry, and so on. You can't create more than five entries because any more will be ignored.

You can use a string (REG_SZ) to identify the target folder for a PlaceX entry. You must specify the folder's full pathname. You can also use a numeric index (REG_DWORD) to specify the target folder if it's a system folder. 


It's possible to use these 'dword' values to address standard folders:

00 - Desktop
01 - Internet Explorer
02 - Start Menu\Programs
03 - My Computer\Control Panel
04 - My Computer\Printers
05 - My Documents
06 - Favorites
07 - Start Menu\Programs\Startup
08 - \Recent
09 - \SendTo
0a - \Recycle Bin
0b - \Start Menu
0c - - logical "My Documents" desktop icon
0d - My Music
0e - My Videos
10 - \Desktop
11 - My Computer
12 - My Network Places
13 - \NetHood
14 - WINDOWS\Fonts
15 - Templates
16 - All Users\Start Menu
17 - All Users\Programs
18 - All Users\Start Menu
19 - All Users\Desktop
1a - \Application Data
1b - \PrintHood
1c - \Local Settings\Application Data
1d - - Nonlocalized startup
1e - - Nonlocalized common startup
1f - Favorites
20 - Temporary Internet Files
21 - Cookies
22 - History
23 - All Users\Application Data
24 - WINDOWS directory
25 - System32 directory
26 - Program files
27 - My Pictures
28 - USERPROFILE
29 - - x86 system directory on RISC
2a - - x86 C:\Program Files on RISC
2b - C:\Program Files\Common
2c - - x86 Program Files\Common on RISC
2d - All Users\Templates
2e - All Users\Documents
2f - All Users\Start Menu\Programs\Administrative Tools
30 - - \Start Menu\Programs\Administrative Tools
31 - Network and Dial-up Connections
35 - All Users\My Music
36 - All Users\My Pictures
37 - All Users\My Video
38 - Resource Directory
39 - Localized Resource Directory
3a - Links to All Users OEM specific apps
3b - USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning

Example:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\comdlg32\Placesbar]

"Place0"=dword:00000011 ; My Computer
"Place1"=dword:00000005 ; My Documents
"Place2"="D:\Music"
"Place3"="C:\Sites"
"Place4"="C:\Temp"

 

If you want to go back to the default Places Bar, you simply delete the Placesbar subkey.


Method 2 - Group Policy editor

1. Type GPEDIT.MSC in the Start, Run

2. Navigate to this location:

User Configuration -> Administrative Templates -> Windows Components -> Windows Explorer -> Common Open File Dialog

3. Double-click Items displayed in Places Bar and add your places.


Method 3 - PlacesBar Constructor

Is the easiest method. Just run PlacesBar Constructor. It presents a lists of folders to put in your PlacesBar.

Download