13 March 2009

Registry Fun

Remove 'Shortcut To ...' Prefix when you create new Shortcut

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]
"link"=hex:00,00,00,00

Are you getting 'Low Disk Space Notification' ? This Disables Low Diskspace Warnings

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoLowDiskSpaceChecks"=dword:00000001

Clear 'Recent Documents' on Log off/Shutdown

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"ClearRecentDocsOnExit"=dword:00000001
Change Drive Icon (You have to change the \C\ below to the drive you want to change)
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\C\DefaultIcon]
""="c:\somefolder\icon.ico"

Empty Temporary Internet Files Folder When Browser Is Closed

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache]
"Persistent"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache]
"Persistent"=dword:00000000

Remove "Links" Folder From Favorites

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar]
"Locked"=dword:00000001
"LinksFolderName"=""

Recycle Bin Edits

Fooling with the recycle bin. Why not make the icon context menu act like other icon context menu's.
Add rename to the menu:
[HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder]
"Attributes"=hex:50,01,00,20
Add delete to the menu:
[HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder]
"Attributes"=hex:60,01,00,20
Add rename and delete to the menu:
[HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder]
"Attributes"=hex:70,01,00,20
Restore the recycle bin to win defaults including un-deleting the icon after deletion:
... Restore the icon.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\Desktop\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E}]
@="Recycle Bin"
... reset win defaults
. [HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder]
"Attributes"=hex:40,01,00,20
Other edits to the recycle bin icon:
[HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder]
"Attributes"=hex:40,01,01,20 ... standard shortcut arrow
"Attributes"=hex:40,01,02,20 ... another shortcut arrow
"Attributes"=hex:40,01,04,20 ... and another shortcut arrow
"Attributes"=hex:40,01,08,20 ... make it look disabled (like it's been cut)
I added the above edits for fun. But it gets you thinking.
Note: Adding rename and delete to the context menu takes effect instantly. To restore the icon after deletion requires screen refresh (F5).
Have fun.... Tom

Setting the Minimum Password Length

Start Regedit
Go to HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Network
Add a new Binary Value
Rename it to MinPwdLen
Assign it a value equal to your minimum password length

Specifying programs to run every time Windows starts

If you want to start programs every time Windows runs, but would like to hide them from users by not having the listed in the Startup folder or the WIN.INI file, you can have them load through the registry.
Start Regedit
Go to HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Run or RunOnce
Right click on the right panel
Select New / String Value
Type in any name
For the value, enter the path and executable for the program you want to run.

Removing the Shortcut Icon Arrows

Open REGEDIT.EXE
Open the Key HKEY_CLASSES_ROOT
Open the Key LNKFILE
Delete the value IsShortcut
Open the next Key PIFFILE
Delete the value IsShortcut
Restart the Win

Turn Off Window Animation

You can shut off the animation displayed when you minimize and maximize windows.
Open Regedit
HKEY_CURRENT_USER
Control panel
Desktop
WindowMetrics
Right Mouse Click an empty space in the right pane.
Select new string value.
Name the new value MinAnimate.
Doubleclick on the new string value (MinAnimate) and click on "Modify"
Enter a value of 0 for Off or 1 for On then hit Enter
Close Regedit and all programs then reboot.

To speed up the Start Menu

Start the REGEDIT program
Search for the word desktop
This should be in HKEY_CLASSES_ROOT / CLSID / {00021400...
Right Click on the right panel
Pick NEW / String Value.
Name it MenuShowDelay, all one word.
Select a value from 1-10, 1 being the fastest.
Exit REGEDIT
Restart Windows

Removing Programs listed from the Control Panel's Add/Remove Programs Section

If you remove an installed program and its files by deleting the files,
it may still show up in the Add/Remove programs list through the control panel.
In order to remove it from the list (so you don't need to re-install in order to just remove it again).
Start the Registry Editor
Open HKEY_LOCAL_MACHINE / SOFTWARE / Microsoft / Windows / CurrentVersion / Uninstall
Delete any programs here.
This will only delete them from the list, not delete the actual programs.
Only programs designed for Windows will show up here in the first place.

Disabling the F3 Search Key

If you want to disable the ability to use the F3 key from either the Windows Explorer or Internet Explorer
Start Regedit
Go to HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Restrictions
Create a Dword value called NoFindFiles
Give it a value of 1
Reboot

Preventing Changes to File Associations

You can prevent users from changing associations via Windows Explorer's Tools / Folder Options / File Types tab.
Start Regedit
Go to HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explore
Create REG_DWORD data type NoFileAssociate
Give it a value of 1

Turning off System Beeps

If you want to turn off all system beeps (like the ones that go through your computers' internal speaker
Start Regedit
Go to HKEY_CURRENT_USER\Control Panel\Sound
Edit the key Beep and give it a value of No

Changing the Location of Special Folders

You can modify the registry to change the location of special folders like:
My Documents
Favorites
My Pictures
Personal
Start Regedit
Go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Double click on any locations you want to change and alter the path
Logoff or restart for the changes to go into effect
Note: TweakUI from Microsoft will allow you to make these changes from a dialog box as well

Setting the Recycle Bin to Always Delete

You can set the recycle bin to always delete items (like holding down the shift key when dragging files to the recycle bin)
Start Regedit
Go to HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer \ BitBucket
Set the key NukeOnDelete to 1

Setting the Internet Explorer Home Page

If you want to set the home page used by Internet Explorer through the registry
Start Regedit
Go to HKey_Current_User \ Software \ Microsoft \ Internet Explorer \ Main
Give the Start Page key the string value you wish set as homepage

Prevent Changes to the Start Menu

To prevent any changes to the Start Menu, even a right click:
Start Regedit
Go to HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer
Add a DWORD called NoChangeStartMenu
Give it a value of 1

Control Panel Restrictions

There are many general restrictions you can make to the Control Panel
Start Regedit
Go to HKEY_Current_User / Software / Microsoft / Windows / CurrentVersion / Policies
Create a new keys under Policies called System
You can then add DWORD values set to 1 in the appropriate keys
To re-enable them, either delete the key or set the value to 0
NoDispCPL - Disable Display Control Panel
NoDispBackgroundPage - Hide Background Page
NoDispScrSavPage - Hide Screen Saver Page
NoDispAppearancePage - Hide Appearance Page
NoDispSettingsPage - Hide Settings Page
NoSecCPL - Disable Password Control Panel
NoPwdPage - Hide Password Change Page
NoAdminPage - Hide Remote Administration Page
NoProfilePage - Hide User Profiles Page
NoDevMgrPage - Hide Device Manager Page
NoConfigPage - Hide Hardware Profiles Page
NoFileSysPage - Hide File System Button
NoVirtMemPage - Hide Virtual Memory Button

Restricting the Start Menu, Explorer and the Desktop

There are many general restrictions you can make to the Start Menu, the Explorer and to the Desktop itself.
Start Regedit
Go to HKEY_Current_User / Software / Microsoft / Windows / CurrentVersion / Policies
There should already be at least a Explorer section there already
Additional keys that can be created under Policies are WinOldApp
You can then add DWORD values set to 1 in the appropriate keys
To re-enable them, either delete the key or set the value to 0
ClearRecentDocsOnExit = Clear of Recent Documents on Exit
NoAddPrinter = Adding new printers
NoClose = Computer Shutdown
NoDeletePrinter = Delete Installed Printers
NoDesktop = Doesn't show Desktop items as well as and Desktop right-click menu
NoDevMgrUpdate = Windows 98/ME web Update Manager
NoDrives [hex] = Hides Drives in my computer
NoFind = Find command
NoInternetIcon = Internet Icon on Desktop
NoNetHood = Network Neighborhood
NoRecentDocsHistory = Recent Documents in Start Menu
NoRun = Run command
NoSaveSettings = Save Settings on exit
NoSetFolders = Folders in Start Menu -> Settings
NoSetTaskbar = Taskbar in Start Menu -> Settings
NoSMMyDocs = My Documents folder in Start Menu
NoSMMyPictures = My Pictures folder in Start Menu
NoWindowsUpdate = Windows web Update

Changing the Title on Windows Media Player

You can change the title bar for the Windows Media Player
Start Regedit
Go to HKEY_USERS \ .DEFAULT \ Software \ Policies \ Microsoft \ WindowsMediaPlayer
Create a string value of TitleBar
Give it a value of whatever you want to appear in the title bar

Eliminating the Right Click on the Taskbar

To eliminate the right click on the taskbar:
Start Regedit
Go to HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer
Add a DWORD and give it a name of NoTrayContextMenu
Give it a value of 1
Reboot

Eliminating the Right Click on the Desktop

To eliminate the right click on the desktop:
Start Regedit
Go to HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer
Add a DWORD and give it a name of NoViewContextMenu
Give it a value of 1
Reboot

Turning Off the Help on Min, Max, Close Icons

When the mouse goes over the minimize, maximize and close icons on the upper right hand side of a window, you normally get a display telling you want those are for.
To disable that display:
Start Regedit
Go to HKEY_CURRENT_USER \ Control Panel \ Desktop
Create a String Value called MinMaxClose
Give it a value of 1
Reboot

Adding Open With to the Right Click in the Explorer

To add the option Open With when you right click on a file in the Explorer:
Start Regedit
Go to HKEY_LOCAL_MACHINE \ Software \ CLASSES \* \ shell \ openas \ command
If this key isn't there then just create it
Give it the value of C:\WINDOWS\rundll32.exe shell32.dll,OpenAs_RunDLL %1

Fixing no AutoRun for CDs

If your CDs have stop starting automatically, and you have checked everything else:
Start Regedit
HKEY_USERS\.Default\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
The value for NoDriveTypeAutoRun should be set to 95 00 00 00

Sticky Menus

Normally when you move the mouse over the Start Menu / Programs, it will automatically cascade and show the submenus.
If you want them to open only when you actually click on them:
Start Regedit
Go to HKEY_CURRENT_USER \ Control Panel \ Desktop
If if it not already there, create a string called MenuShowDelay
Give it a value of 65534

Creating a Legal Text Notice Before Logon

You can create a banner that will come up just before you logon to the computer:
Start Regedit
Go to HKeyLocalMachine \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ WinLogon
Create a new string value called LegalNoticeCaption and give it a value you want to see in the menu bar
Create a new string value called LegalNoticeText and give it a value you want to see in the dialog box
Now before anyone logs into that computer, this banner will come up on the screen.
This can be useful for any legal warnings you want to give regarding the use of the computer.

Enabling the Middle Mouse Button on Logitech Mouse

To enable the middle mouse button on Logitech Mouses to act as a double-click button by only pressing it once:
Run Regedit
Go to HKEY_LOCAL_MACHINE\SOFTWARE\LOGITECH\MOUSEWARE\CURRENTVERSION\SERIALV\0000
Change DoubleClick to equal 001

Easily Opening a File with Notepad

This will enable you to right click on any file and have the option to open it with notepad.
Also if a file has no association and you try to open it it will open with notepad
Run 'regedit.exe'
Expand "HKEY_CLASSES_ROOT"
Inside "HKEY_CLASSES_ROOT", expand "*"
Inside "*", create a key called "shell"
Inside "shell" create a key called "open"
Inside "open" edit the string "(default)" to say "open (notepad)"
Inside "open" create a key called "command"
Inside "command" edit the string "(default)" to say C:\WINDOWS\NOTEPAD.EXE "%1"

Removing Unwanted Items from the RUN Menu

Start the REGEDIT program
Search for the word RUNMRU
Delete the ones you don't want
Rename so they are all in alphabetical order again
Close and restart windows

Removing Sound Events from Control Panel / Sounds

When you view what events you can assign sounds to from Control Panel / Sounds,
you cannot delete the events themselves. In order to do that:
Start Regedit
Go to HKEY_CURRENT_USER / AppEvents / Schemes / Apps
From here you can delete any items you don't want to show or no longer need.

Adding an Application to the Right Click on Every Folder

Here is how to add any application to the menu when you right click on any Folder.
This could be useful if there is an app you always want available and don't want to go through the Start menu
Start Regedit
Go to HKEY_CLASSES_ROOT \ Folder \ shell
Add a key Name_of_Your_App
This can really be any label, just use one that makes sense to you
Give it a default value of Name_of_Your_App
Putting a & in front of a character will allow you to use the keyboard
Go to HKEY_CLASSES_ROOT \ Folder \ shell \ Name_of_Your_App
Add a key command
Give it a default value of the application you want to run
For example: c:\program files\internet explorer\iexplore.exe
Include the full path
Now when you right click on any folder, you can have access to that application
This will work for both Windows and NT 4.0

Adding Explore From Here to Every Folder

Start Regedit
Go to HKEY_CLASSES_ROOT \ Folder \ shell
Add a key rootexplore
Give it a default value of E&xplore From Here
Go to HKEY_CLASSES_ROOT \ Folder \ shell \ rootexplore
Add a key command
Give it a default value of Explorer.exe /e,/root,/idlist,%i
Now when you right click on any folder, you can open up an Explorer window of that folder.
This will work for both Windows95 and NT 4.0

Removing Open, Explore & Find from Start Button

When you right click on the Start Button, you can select Open, Explore or Find.
Open shows your Programs folder. Explore starts the Explorer and allows access to all drives.
Find allows you to search and then run programs. In certain situations you might want to disable this feature.
To remove them:
Start Regedit
Search for Directory
This should bring you to Hkey_Classes_Root \ Directory
Expand this section by clicking on the "+"
Under shell is Find
Delete Find
Scroll down below Directory to Folder
Expand this section under shell
Delete Explore and Open
Note: - When you remove Open, you cannot open any folders.

Removing Items from NEW

When you right-click on the desktop and select New, a list of default templates you can open up are listed.
To remove items from that list:
Start Regedit
Search for the string ShellNew
This should bring you to HKey_Classes_Root
For the items you want to remove, simply rename the ShellNew command
Renaming is safer that deleting it
Continue searching for the items you want to remove
You do not need to reboot for the change to take effect

Disabling Run or Find from the Start Menu

Start Regedit
Go to HKey_Current_User \ Software\ Microsoft \Windows \ Current Version \ Policies \ Explorer
Right click on the right panel and add a New / DWORD
Name it NoFile or NoRun
Give it a value of 1
Logoff or Reboot the computer

Get Your Folders to Open the Way You Want Every Time

To get your folders to open the way you want every time:
Set up all your folders the way you want (auto arrange, view, etc.),
Start RegEdit
Go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer.
Go to NoSaveSettings
Modify and change Value to 1

Modifying Default Desktop Icons

Start Regedit
Go to HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ explorer \ Shell Icons
The default icons are numbered in the right panel from 0-40
Double click on the number of the particular icon you want to change. See the chart below.
Enter the name of the icon file you want to use followed by the number of the icon in that file.
Note: The numbering starts with zero.
If you use a single .ICO file, it should be followed by a 0.
e.g. - filename.dll,4 - This would actually be the 5th icon since it starts with 0.
Make sure you delete the hidden file C:\WINDOWS\SHELLICONCACHE
Below is a reference for the icons I've been able to figure out:
0 - Default Icon
1 - Default Document
2 - Application
3 - Closed Folder
4 - Open Folder
5 - 5 1/4 Drive
6 - 3 1/4 Drive
7 - Removable Drive
8 - Hard Drive
9 - Network Folder
10 - Network Offline
11 - CD
12 - RAM Drive
13 - Entire Nertwork
15 - My Computer
16 - Printer
17 - Network Neighborhood
18 - Network Workgroup
19-27 are the Start Menu icons
19 - Programs
20 - Desktop
21 - Settings
22 - Find
23 - Help
24 - Run
25 - Suspend
27 - Shutdown
28 - Share
29 - Shortcut
31 - Recycle Bin (Empty)
32 - Recycle Bin (Full)
33 - Folder, Dial-Up Networking
34 - Desktop
36 - Program Group
40 - Audio Card
In addition, you can change:
My Computer - HKEY_CLASSES_ROOT\ CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}
Network Neighborhood - HKEY_CLASSES_ROOT\ CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}
InBox - HKEY_CLASSES_ROOT\ CLSID\{00020D75-0000-0000-C000-000000000046}
Recycle Bin - HKEY_CLASSES_ROOT\ CLSID\{645FF040-5081-101B-9F08-00AA002F954E}

Disabling the Right-Click on the Start Button

Normally, when you right button click on the Start button, it allows you to open your programs folder, the Explorer and run Find.
In situations where you don't want to allow users to be able to do this in order to secure your computer.
Start Regedit
Search for Desktop
This should bring you to HKey_Classes_Root \ Directory
Expand this section
Under Shell is Find
Delete Find
Move down a little in the Registry to Folder
Expand this section and remove Explore and Open
Now when you right click on the Start button, nothing should happen.
You can delete only those items that you need.
Note: - On Microsoft keyboards, this also disables the Window-E (for Explorer) and Window-F (for Find) keys.

Disabling My Computer

In areas where you are trying to restrict what users can do on the computer, it might be beneficial to disable the ability to click on My Computer and have access to the drives, control panel etc.
To disable this:
Start Regedit
Search for 20D04FE0-3AEA-1069-A2D8-08002B30309D
This should bring you to the HKey_Classes_Root \ CLSID section
Delete the entire section.
Now when you click on My Computer, nothing will happen.
You might want to export this section to a registry file before deleting it just in case you want to enable it again..

Opening Explorer from My Computer

By default, when you click on the My Computer icon, you get a display of all your drives, the Control Panel etc. If you would like to have this open the Explorer:
Start Regedit
Search for My Computer or 20D04FE0-3AEA-1069-A2D8-08002B30309D
This should bring you to HKey_Classes_Root \ CLSID
Expand the key {20D04FE0-3AEA-1069-A2D8-08002B30309D}
Right click on Shell
Select New / Key and type Open and press the Enter key
Right click on Open
Select New / Key and type Command and press the Enter key
Double click on the Default for Command and type Explorer.exe for the value
Now when you click on My Computer, the Explorer will start
If you want to return to normal, simply delete the Open key