Flylib.com

Books Software

 
 
 

Environment


Environment

The key HKCU\Environment defines per- user environment variables . Normally, all you see in this key are two values: TEMP and TMP . Both are REG_EXPAND_SZ values. You can add environment variables to Environment , however, and then use those from within batch files, REG_EXPAND_SZ values, and so on. Of course, you can also rely on the user interface to add environment variables. In Control Panel launch System, and then, on the Advanced tab, click Environment Variables. Per-user environment variables are at the top of the dialog box, and per-computer environment variables are at the bottom.



Keyboard Layout

The key HKCU\Keyboard Layout defines the keyboard layouts that you configure using the Regional And Language Options dialog box. In essence, a keyboard layout maps the physical keys on your keyboard to the characters they generate. Keyboard layouts enable you to write German text using a U.S. English keyboard, for example. This key sometimes contains a single REG_DWORD value, Attributes , which determines which key to use for CAPS LOCK. If this value is , Windows uses the CAPS LOCK key. If this value is 0x10000 , the operating system uses the SHIFT key. You sometimes see three subkeys in HKCU\Keyboard Layout :

  • Preload .

    This subkey contains the ID of each keyboard layout the user chooses through the Regional And Language Options dialog box. Windows uses this data to restore the keyboard layout when the user logs back on. The first value is 1 , the second is 2 , and so on. The value 1 is the default keyboard layout.

  • Substitutes .

    This subkey stores the IDs of alternate keyboard layouts. Windows checks this subkey when loading a keyboard layout, and if it finds a substitute, it uses that instead of the default layout. This key is usually empty until the user chooses substitute keyboard layouts.

  • Toggle .

    This subkey specifies the key sequences that toggle between input locales. It contains the \CONSOLE value Hotkey , which can have one of four values. The value 1 specifies that LEFT ALT+SHIFT switches locales. The value 2 specifies CTRL+SHIFT, 3 disables the key sequence altogether, and 4 specifies the accent grave key when the default locale is Thai.



Network

The key HKCU\Network contains data about the user 's mapped network drives . Each subkey represents a mapped drive that Windows restores the next time the user logs on to the computer. The name of the subkey is HKCU\Network\ Drive , where drive is the drive letter mapped to the network path . The following values are in each mapped drive's subkey:

  • ConnectionType .

    This REG_DWORD value specifies how to connect the drive to the local computer. A value of 1 means drive redirection and 2 means print redirection. The default value is 1 .

  • ProviderName .

    This \CONSOLE value specifies the connection's network provider. The default value is Microsoft Windows Network .

  • ProviderType .

    This REG_DWORD value identifies the provider that makes the network connection. The value for the Microsoft LanMan provider is 0x20000 . Other network providers use different values.

  • RemotePath .

    This \CONSOLE value contains the network connection's UNC path using the notation \\Computer\Share .

  • UserName .

    This \CONSOLE value contains the user's name, including the domain. It identifies the user who made the network connection, and Windows uses it to fill the Connect As box in the Map Network Drive dialog box.