Wednesday, December 31, 2008

48. Automatically Turn On Num Lock, Scroll Lock, and Caps Lock




When you start your PC, Num Lock, Scroll Lock, and Caps Lock don't automaticallytoggle on. You can automatically turn each of them on or off whenever your PCstarts, for all accounts on the PC. As a practical matter, most people probably want tohave only Num Lock automatically turned on, but this Registry hack allows you toforce any combination of keys on or off.



Run the Registry Editor [Hack #83] and goto HKEY_USERS\.Default\Control Panel\Keyboard. Find the String valueInitialKeyboardIndicators. By default, it is set to 0, which means that Num Lock,Scroll Lock, and Caps Lock are all turned off. Set it to any of the following values,depending on the combination of keys you want turned on or off:
0-Turns off Num Lock, Caps Lock, and Scroll Lock1-Turns on Caps Lock2-Turns on Num Lock3-Turns on Caps Lock and Num Lock4-Turns on Scroll Lock5-Turns on Caps Lock and Scroll Lock6-Turns on Num Lock and Scroll Lock7-Turns on Caps Lock, Num Lock, and Scroll LockExit the Registry. When you restart, the new setting will take effect.



47. Control User Logins by Hacking the Registry


To control logon options, run the Registry Editor [Hack #83] and go to theHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersionWinlogon subkey, which contains a variety of logon settings (as well as some settingsnot having to do directly with logons).

Following are the most important values youcan edit to customize logons
DontDisplayLastUserName
This setting lets you control how the system logon dialog box is used. If this Stringvalue is present and set to 1, all users will have to enter both their username andpassword to log on.

If the value is 0, the name of the last user to log on will bedisplayed in the system logon dialog box.
DefaultUserNameThis String value contains the name of the last user who logged on. It will bedisplayed only if the DontDisplayLastUserName value is not present or is set to 0.LegalNoticeCaption and LegalNoticeText// Already discussed
PasswordExpiryWarningThis DWORD value lets you display a warning message to users a certain number ofdays before their passwords are set to expire. It lets you determine how many daysahead of time the warning should be issued. To edit the value, click the decimalbutton and enter the number of days.
ShutdownWithoutLogonThis String value enables or disables a button on the XP logon dialog box that lets thesystem shut down. A value of 1 enables the button (so that it is shown); a value of 0disables the button (so that it is not shown).


ShellIt determines the shellthe user interfacethat will be used by XP. The default isExplorer.exe, but it can be another shell as wellfor example, the Program Managerfrom older Windows versions. Type in the name of the program; for example,Progman.exe for the Program Manager, or Taskman.exe for the Task Manager.
AutoRestartShellThis DWORD value doesn't have to do with logons either, but it's another good one toknow. It sets whether to automatically restart the Windows shell if the shell crashes. A value of 1 automatically restarts the shell.

A value of 0 tells XP not to restart the shell,forcing you to log off and then back on again to restart it.

46. Play around registry- More Options

Launch Regedit and go to the following Registry Key: HKEY_CURRENT_USER/Software/Microsoft/CurrentVersion/Policies Under this key, there will definitely be a key named explorer.
Now under this explorer key we can create new DWORD valuesand modify it's value to 1 in order to impose the restriction. If you want to remove the Restriction, then you can simply delete the respective DWORD values or insteadchange their values to 0.
The following is a list of DWORD values that can be createdunder the Explorer Key:
NoDeletePrinter: Disables Deletion of already installed PrintersNoAddPrinter: Disables Addition of new PrintersNoRun : Disables or hides the Run CommandNoSetFolders: Removes Folders from the Settings option on Start Menu (ControlPanel, Printers, Taskbar)NoSetTaskbar: Removes Taskbar system folder from the Settings option on StartMenuNoFind: Removes the Find Tool (Start >Find)NoDrives: Hides and does not display any Drives in My ComputerNoNetHood: Hides or removes the Network Neighborhood icon from the desktopNoDesktop: Hides all items including, file, folders and system folders from theDesktopNoClose: Disables Shutdown and prevents the user from normally shutting downWindows.NoSaveSettings: Means to say, 'Don't save settings on exit'DisableRegistryTools: Disable Registry Editing Tools (If you disable this option, theWindows Registry Editor(regedit.exe) too will not work.)NoRecentDocsHistory: Removes Recent Document system folder from the StartMenu (IE 4 and above)ClearRecentDocsOnExit: Clears the Recent Documents system folder on Exit.Nolnternetlcon: Removes the Internet (system folder) icon from the DesktopNow create a new key and name it System. Under this new key, system we can createthe following new DWORD valuesNODispCPL: Hides Control PanelNoDispBackgroundPage: Hides Background page.NoDispScrsavPage: Hides Screen Saver PageNoDispAppearancePage: Hides Appearance PageNoDispSettingsPage: Hides Settings PageNoSecCPL: Disables Password Control PanelNoPwdPage: Hides Password Change PageNoAdminPaqe: Hides Remote Administration PageNoProfilePage: Hides User Profiles PageNoDevMgrPage: Hides Device Manager PageNoConfigPage: Hides Hardware Profiles PageNoFileSysPage: Hides File System ButtonNoVirtMemPage: Hides Virtual Memory ButtonSimilarly, if we create a new subkey named Network, we can add the followingDWORD values under it:NoNetSetupSecurityPage: Hides Network Security PageNoNelSetup: Hides or disables the Network option in the Control PanelNoNetSetupIDPage: Hides the Identification PageNoNetSetupSecurityPage: Hides the Access Control PageNoFileSharingControl: Disables File Sharing ControlsNoPrintSharing: Disables Print Sharing Controls.

45. Change Internet Explorer's Caption

Open the registry editor and go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft \Internet Explorer\Main. In the right pane create a new String Value namesWindow Title (Note the space between Window and Title). Right click on this newlycreated String Value and select Modify. Type in the new caption you want to bedisplayed. Restart for the settings to take place.

44. Shutdown and Reboot in Style


Turning off or rebooting XP involves a several-step process: click the Start menu,choose Shut Down, and then select Shut Down or Restart. If you want, however, youcan exit or reboot much more quickly, by creating a shortcut that enables one-clickshutdowns. You can also use the shortcut to customize the shutdown or reboot forexample, by displaying a specific message or automatically shutting down anyprograms that are running.
First, create a shortcut on your desktop by right-clicking the desktop, choosing New,and then choosing Shortcut. The Create Shortcut Wizard appears. In the box askingfor the location of the shortcut, type shutdown. After you create the shortcut, doubleclicking it will shut down your PC.
But you can do much more with a shutdown shortcut than merely shut down your PC.

You can add any combination of several switches to do extra duty, like this:
shutdown -r -t 01 -c "Rebooting your PC"
Double-clicking that shortcut will reboot your PC after a one-second delay anddisplay the message "Rebooting your PC." The shutdown command includes a varietyof switches you can use to customize it.
Switches you can use with shutdown
Switch What it does-s Shuts down the PC.-l Logs off the current user.-t nn Indicates the duration of delay, in seconds, before performing the action.
Switches you can use with shutdownSwitch What it does
-c "messagetext"Displays a message in the System Shutdown window. A maximumof 127 characters can be used. The message must be enclosed inquotation marks.
-f Forces any running applications to shut down.
-r Reboots the PC.
Here are the ones I use for shutdowns and restarts:
Shutdown -s -t 03 -c "See you later!"
shutdown -r -t 03 -c "You can't get rid of me that quickly!"
You always have to turn from the CPU after running this command. (Same with ATand ATX powered machines.) If you want to turn down power of ATX machineautomatically, run the following commnd "c:\windows\system32\tsshutdn.exe 00 /POWERDOWN / DELAY:00" This is used to turn off a server.

Even though youdon't have networked computers attached to your computer, this works.

43. Disabling Drives in My Computer

To disable the display of local or networked drives when you click My Computer goto HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion \Policies\Explorer Now in the right pane create a new DWORD item and name it NoDrives.
Now modify it's value and set it to 3FFFFFF (Hexadecimal). Now press F5 to refresh.When you click on My Computer, no drives will be shown. To enable display ofdrives in My Computer, simply delete this DWORD item.