|
|
Determine which icons you see in My Computer using the My Computer Category. Table 5-19 describes the settings you must apply to show the Control Panel and Files Stored On This Computer icons in My Computer.
Setting | Name | Type | Data |
---|---|---|---|
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideMyComputerIcons | |||
Control Panel | {21EC2020-3AEA-1069-A2DD-08002B30309D} | REG_DWORD | 0x00 | 0x01 |
HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer | |||
Files Stored on This Computer | NoSharedDocuments | REG_DWORD | 0x00 | 0x01 |
Windows XP can hide drive letters. You hide them by setting NoDrives in the key HKCU \Software\Microsoft\Windows\CurrentVersion\Policies\Explorer, but it's easier using the Tweak UI category Drives. The trick is figuring out the value to put in the REG_BINARY value NoDrives.
Each bit in NoDrives, right to left, corresponds to the drive letters A through Z. To hide drive A, turn on the first bit. To hide drive B, turn on the second bit. Turn on the bit representing each drive that you want to hide. This math is easier if you use Calculator in Scientific mode. Also, see Chapter 1, "Learning the Basics," for some tips on doing bitwise math.
Note | Hiding drive letters in Windows XP doesn't prevent users from accessing those drives through other means, including at the MS-DOS command prompt. This setting hides only those drives in Windows Explorer, the common dialog boxes, and so on. Thus, you can't rely on this as a security measure. |
Windows XP users have special folders in their user profiles, such as the My Documents, My Pictures, and Favorites folders. The default location for these folders is in %USERPROFILE%, but you can redirect them to any location, including a location on the network. That's the purpose of the Tweak UI category Special Folders.
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders is the key where you find each of these special folders. You learn about them in detail in Chapter 4, "Hacking the Registry," and Chapter 17, "Per-User Settings." In Table 5-20 on the next page, look up the folder you want to redirect. Then in User Shell Folders, change the value shown in the Value Column to the folder's new location. I suggest that you use environment variables, particularly when referencing folders in %USERPROFILE% or %SYSTEMROOT%. The next time you log on to Windows XP, Windows XP updates HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\ to reflect your changes. After relocating a shell folder, you must manually move your files and folders from the old location to the new location.
Folder | Value | Default path |
---|---|---|
CD Burning | CD Burning | %USERPROFILE%\Local Settings\Application Data\Microsoft\CD Burning |
Desktop | Desktop | %USERPROFILE%\Desktop |
Document templates | Templates | %USERPROFILE%\Templates |
Favorites | Favorites | %USERPROFILE%\Favorites |
My Documents | Personal | %USERPROFILE%\My Documents |
My Music | My Music | %USERPROFILE%\My Documents\My Music |
My Pictures | My Pictures | %USERPROFILE%\My Documents\My Pictures |
Programs | Programs | %USERPROFILE%\Start Menu\Programs |
Send To | SendTo | %USERPROFILE%\SendTo |
Start menu | Start Menu | %USERPROFILE%\Start Menu |
Startup | Startup | %USERPROFILE%\Start Menu\Programs\Startup |
Tip | I always relocate the My Documents, My Pictures, and Favorites folders to a network location. Doing so ensures that I always have access to my documents and Internet shortcuts from any computer on the network. I use Group Policy to automatically redirect the My Documents and My Pictures folders so I don't have to think about it. I use a script to relocate the Favorites folder on each computer that I use, however, because Group Policy doesn't support redirecting Favorites folders. Using a script makes redirecting Favorites easy but still not automatic. |
All the action in the AutoPlay category is in its subcategories: Drives, Types, and Handlers. In the Drives category, you can prevent specific drives from playing media automatically when you insert them. You use the value NoDriveAutoRun, which is a REG_BINARY value, just like the NoDrives value you learned about earlier. For each drive that you want to stop from playing disks automatically, set the bit, right to left, which corresponds to the drive letters A through Z. NoDriveAutoRun is in the key HKCU\Software\Microsoft\Windows \CurrentVersion\Policies\Explorer.
The next subcategory is Types. In this category, you can control whether CDs, DVDs, and removable drives automatically play when you insert disks. Table 5-21 describes the values that correlate to the settings you see in this category. Just like you did with the value UserPreferencesMask, you must toggle the bit shown in the Data column. To prevent CD drives from automatically playing, for example, set bit 0x20 in the REG_DWORD value NoDriveTypeAutoRun.
Setting | Name | Type | Data |
---|---|---|---|
HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer | |||
Enable Autoplay for CD and DVD drives | NoDriveTypeAutoRun | REG_DWORD | Bit 0x20 |
Enable Autoplay for removable drives | NoDriveTypeAutoRun | REG_DWORD | Bit 0x04 |
The last subcategory is Handlers. When Windows XP detects that you've inserted a CD, DVD, or removable disk, it automatically runs the program that it associates with the type of content on that disk. You control what programs are used with which types of content using the Handlers tab. This setting is much easier to configure in Tweak UI than manually, but we'll try it anyway.
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers is the key where you find these associations. In Table 5-22, look up the type of content you want to customize. Then open the subkey shown in the Subkey column for EventHandlers. In that subkey, add any of the following handlers as an empty REG_SZ value:
MSCDBurningOnArrival
MSOpenFolder
MSPlayCDAudioOnArrival
MSPlayDVDMovieOnArrival
MSPlayMediaOnArrival
MSPlayMusicFilesOnArrival
MSPlayVideoFilesOnArrival
MSPrintPicturesOnArrival
MSPromptEachTime
MSPromptEachTimeNoContent
MSShowPicturesOnArrival
MSTakeNoAction
MSVideoCameraArrival
MSWiaEventHandler
Media | Subkey |
---|---|
Generic | GenericVolumeArrival |
Blank CDR | HandleCDBurningOnArrival |
Mixed content | MixedContentOnArrival |
CD audio | PlayCDAudioOnArrival |
DVD | PlayDVDMovieOnArrival |
Music files | PlayMusicFilesOnArrival |
Video files | PlayVideoFilesOnArrival |
Digital images | ShowPicturesOnArrival |
Video camera | VideoCameraArrival |
|
|