1. Setting the Environment
Normally you use the
Environment Variables dialog box to set both user and system environment
variables. However, this option isn't available in Server Core, so you
must either set the environment variables in the registry directly or
use a command line utility to perform the task.
When working at the command line, you can choose between creating session or permanent environment variables. Use the Set and SetX commands to create session environment variables. Use the WMIC Environment command to create permanent environment variables for the current user . You can't create permanent system-level environment variables at the command line.
Permanent environment
variables are those that exist between reboots. Once you set them, you
can depend on them remaining in place until you change them. A
user-level environment variable affects only the current user. You'll
find these environment variables in the HKEY_CURRENT_USER\ Environment key. The default environment variables include Path, TEMP, and TMP.
A system-level environment variable affects everyone that uses the system. You'll find these environment variables in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ Session Manager\Environment key. The default environment variables include comspec,
FP_NO_HOST_CHECK, lib, NUMBER_OF_PROCESSORS, OS, Path, PATHEXT,
PROCESSOR_ARCHITECTURE, PROCESSOR_IDENTIFIER, PROCESSOR_LEVEL,
PROCESSOR_REVISION, TEMP, TMP, and windir.
Each environment variable
appears as a separate value under its respective key. Use the following
procedure to add a new environment variable.
Right-click the appropriate key.
Choose New => String Value from the context menu.
Type the name of the environment variable you want to create and press Enter.
Double-click the new environment variable. You'll see the Edit String dialog box.
Type the value you want in the Value Data field of the Edit String dialog box.
Click OK to complete the process.
At this point, you can use
the environment variable as you would any other environment variable.
You can also export your environment variables and import them into the
registry on a similarly configured machine. Of course, you'll want to be
sure that you format the environment variables correctly to ensure they
aren't drive letter or hardware specific.
2. Modifying the Hardware Setup
Many of the settings you
need to change to control the hardware on your system appear as part of
the console or software settings. For example, if you want to control
the appearance of the text on your display, you actually need to change
the console settings and not the hardware settings. Likewise, if you
want to change how the system handles languages, then you need to change
the international settings instead of the keyboard settings.
The hardware settings
fall into two categories. First, vendors provide specific settings for
their hardware. Because there are so many hardware vendors on the
market, it's impossible to provide a comprehensive list of
vendor-specific settings.
Second, generic settings affect Server Core as a whole and they're part
of the generic drivers that affect all hardware. The following sections
describe this second category of hardware setting. You won't find every
generic setting here, but you'll find many that you normally need to set
as part of the GUI, rather than access them directly in the registry.
2.1. Video
The video settings are a bit
tough to set. It's not a matter of finding the settings, so much as
figuring out which settings to change. The best way to proceed is to
locate the Globally Unique Identifier (GUID) for your adapter. Locating
this information means knowing the name of the display adapter. For
example, on one system I own, I have a Gigabyte RADEON X300 installed.
Searching for this string in the registry netted several hits, but the
one that I want is under the HKEY_LOCAL_MACHINE\ SYSTEM\CurrentControlSet\Enum\PCI\ key. In this case, the information appears as part of the VEN_1002&DEV_5B60&SUBSYS_21021458&REV_00\4&243d7bd0&1&0070 key, but your setup is likely different from mine.
The Device Parameters
subkey is the one you want. It contains a VideoID value. The data value
contains the GUID for the display adapter. Double-click the value. Press
Ctrl+C to copy of the GUID to the clipboard. In my case, the GUID is
{2E9CD519-7E88-4189-9745-5389D6D145CF}—your GUID will likely differ from
mine. Press Ctrl+F to display the Find dialog box. Press Ctrl+V to
paste the GUID into the Find What field of the Find dialog box. If you
leave just the Keys option checked in the Look At field, you'll locate
the information you need faster. Press OK to begin the search.
Your search should take you to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hard-ware Profiles\0001\System\CurrentControlSet\Control\VIDEO
key. The Registry Editor actually highlights the adapter GUID for which
you searched. The 0000 subkey contains the settings you want to change.
If you have the ability to attach multiple monitors to your system,
you'll see an additional subkey for each monitor and you'll need to
change the settings there. For example, the complete key path for the
first monitor on my system is HKEY_LOCAL_MACHINE\SYSTEM\
CurrentControlSet\Hardware
Profiles\0001\System\CurrentControlSet\Control\VIDEO\
{2E9CD519-7E88-4189-9745-5389D6D145CF}\0000\Mon10000084.
Table 1
contains a list of the settings you can modify in most cases. After you
make a change, you'll need to restart the system to see the difference
because Windows doesn't know to incorporate the settings for you.
Table 1. Common Video Adapter Settings
Value Name | Value Type | Default Value |
---|
Attach.ToDesktop | REG_DWORD | 00000001 |
DefaultSettings.BitsPerPel | REG_DWORD | 00000010 |
DefaultSettings.XResolution | REG_DWORD | 00000500 |
DefaultSettings.YResolution | REG_DWORD | 00000400 |
DefaultSettings.VRefresh | REG_DWORD | 0000003c |
DefaultSettings.Flags | REG_DWORD | 00000000 |
DefaultSettings.XPanning | REG_DWORD | 00000000 |
DefaultSettings.YPanning | REG_DWORD | 00000000 |
DefaultSettings.Orientation | REG_DWORD | 00000000 |
DefaultSettings.FixedOutput | REG_DWORD | 00000000 |
Attach.RelativeX | REG_DWORD | 00000000 |
Attach.RelativeY | REG_DWORD | 00000000 |
2.2. Keyboard
Keyboards
are pretty much generic from a configuration perspective, so you don't
have to spend a lot of time looking for the values you need. In general,
you can set all of the hardware configuration settings that you find in
the Keyboard applet of the Control Panel. Table 2 shows the settings you can change.
Table 2. Generic Keyboard Settings
Key Name | Value Name | Value Type | Default Value |
---|
HKEY_CURRENT_USER\Control Panel\Keyboard | InitialKeyboardIndicators | REG_SZ | 2147483648 |
HKEY_CURRENT_USER\Control Panel\Keyboard | KeyboardDelay | REG_SZ | 1 |
HKEY_CURRENT_USER\Control Panel\Keyboard | KeyboardSpeed | REG_SZ | 31 |
2.3. Mouse
The mouse has
some differences based on the features you obtain for it. For example,
you might have a three-button mouse instead of a two-button mouse. In
addition, you have to consider differences for left- and right-handed
users. Even so, Windows provides many generic settings for the mouse.
You'll find all of the generic settings in Table 3.
Most of these settings also appear in the Mouse applet of the Control
Panel. Refer to your vendor documentation for specialized settings for
your mouse.
Table 3. Generic Mouse Settings
Key Name | Value Name | Value Type | Default Value |
---|
HKEY_CURRENT_USER\Control Panel\Mouse | ActiveWindowTracking | REG_DWORD | 0 |
HKEY_CURRENT_USER\Control Panel\Mouse | Beep | REG_SZ | No |
HKEY_CURRENT_USER\Control Panel\Mouse | DoubleClickHeight | REG_SZ | 4 |
HKEY_CURRENT_USER\Control Panel\Mouse | DoubleClickSpeed | REG_SZ | 500 |
HKEY_CURRENT_USER\Control Panel\Mouse | DoubleClickWidth | REG_SZ | 4 |
HKEY_CURRENT_USER\Control Panel\Mouse | ExtendedSounds | REG_SZ | No |
HKEY_CURRENT_USER\Control Panel\Mouse | MouseHoverHeight | REG_SZ | 4 |
HKEY_CURRENT_USER\Control Panel\Mouse | MouseHoverTime | REG_SZ | 400 |
HKEY_CURRENT_USER\Control Panel\Mouse | MouseHoverWidth | REG_SZ | 4 |
HKEY_CURRENT_USER\Control Panel\Mouse | MouseSensitivity | REG_SZ | 10 |
HKEY_CURRENT_USER\Control Panel\Mouse | MouseSpeed | REG_SZ | 1 |
HKEY_CURRENT_USER\Control Panel\Mouse | MouseThreshold1 | REG_SZ | 6 |
HKEY_CURRENT_USER\Control Panel\Mouse | MouseThreshold2 | REG_SZ | 10 |
HKEY_CURRENT_USER\Control Panel\Mouse | MouseTrails | REG_SZ | 0 |
HKEY_CURRENT_USER\Control Panel\Mouse | SmoothMouseXCurve | REG_BINARY | 00 00 00 00
00 00 00 00
15 6e 00 00
00 00 00 00
00 40 01 00
00 00 00 00
29 dc 03 00
00 00 00 00
00 00 28 00
00 00 00 00 |
HKEY_CURRENT_USER\Control Panel\Mouse | SmoothMouseYCurve | REG_BINARY | 00 00 00 00
00 00 00 00
b8 5e 01 00
00 00 00 00
cd 4c 05 00
00 00 00 00
cd 4c 18 00
00 00 00 00
00 00 38 02
00 00 00 00 |
HKEY_CURRENT_USER\Control Panel\Mouse | SnapToDefaultButton | REG_SZ | 0 |
HKEY_CURRENT_USER\Control Panel\Mouse | SwapMouseButtons | REG_SZ | 0 |
The
SmoothMouseXCurve and SmoothMouseYCurve settings control the
acceleration of your mouse. Given that Server Core isn't a
mouse-intensive operating system, you probably won't need to change
these settings. However, if you do find that the mouse doesn't work as
well as expected in Remote Desktop, where you'll often cut and paste
text in the command prompt, you may need to change the settings. One of
the better adjustments appears at http://www.softwaretipsandtricks.com/windowsxp/articles/69/1/Mouse-Permanent-Acceleration-Fix/print/69.
However, a search online for either SmoothMouseXCurve or
SmoothMouseYCurve will likely turn up a wealth of settings you can try.
2.4. Power Configuration
The power configuration
settings control how your computer works with power. For example, you
can set the power policy to shut off the monitor after a specific time
frame or turn off the hard drives when they aren't being used. The
problem is that these policies are set using binary values, which means
that you can't do much more than select a particular policy using the
Registry Editor unless you have documentation for that binary data. That said, Table 4
shows typical registry settings for the power configuration. Most of
these settings normally appear in the Power Options applet of the
Control Panel.
Table 4. Typical Power Configuration Settings
Key Name | Value Name | Value Type | Default Value |
---|
HKEY_CURRENT_USER\Control Panel\PowerCfg | CurrentPowerPolicy | REG_SZ | 8 |
HKEY_CURRENT_USER\Control Panel\PowerCfg\GlobalPowerPolicy | Policies | REG_BINARY | 01 00 00 00 00 00 00 00 03
00 00 00 10 00 00 00 00 00
00 00 03 00 00 00 10 00 00
00 02 00 00 00 03 00 00 00
00 00 00 00 02 00 00 00 03
00 00 00 00 00 00 00 02 00
00 00 01 00 00 00 00 00 00
00 02 00 00 00 01 00 00 00
00 00 00 00 01 00 00 00 03
00 00 00 02 00 00 00 04 00
00 c0 01 00 00 00 04 00 00
00 01 00 00 00 0a 00 00 00
00 00 00 00 03 00 00 00 01
00 01 00 01 00 00 00 00 00
00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 02 00
00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00
00 00 00 00 03 00 00 00 00
00 16 00 00 00 |
HKEY_CURRENT_USER\Control Panel\PowerCfg\ PowerPolicies\0 | Name | REG_SZ | Home/Office Desk |
HKEY_CURRENT_USER\Control Panel\PowerCfg\ PowerPolicies\0 | Description | REG_SZ | This scheme is suited to most home or desktop computers that are left plugged in all the time. |
HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\0 | Policies | REG_BINARY | 01 00 00 00 02 00 00 00 01
00 00 00 00 00 00 00 02 00
00 00 00 00 00 00 00 00 00
00 00 00 00 00 2c 01 00 00
32 32 00 03 04 00 00 00 04
00 00 00 00 00 3d 77 2e f2
07 00 b0 04 00 00 2c 01 00
00 00 00 00 00 58 02 00 00
00 00 64 64 64 64 91 7c |
The CurrentPowerPolicy setting is the one of interest. Changing this value changes the preconfig-ured power policy. Table 4.8
only shows one PowerPolicy key setting. A typical computer contains at
least five subkeys and you can choose any of them as a power
configuration for the computer.
2.5. Network
Network drive
mappings are important because they provide access to other resources on
the network such as disk drives. Generally, you'll use the Net Use command to map a network drive. However, you can perform tweaks of existing drive mappings or even create new mappings using the registry as well. Table 5
shows typical settings for a network drive mapping. Your drive mapping
contains the same keys, but has different data from the data shown in Table 5. A drive mapping doesn't have any default data—only the specific data required to create the drive mapping. The I key in this example is the local drive letter for the mapping.
Table 5. Typical Network Mappings
Key Name | Value Name | Value Type | Typical Value |
---|
HKEY_CURRENT_USER\Network\I | RemotePath | REG_SZ | \\\\Winserver\\Drive C |
HKEY_CURRENT_USER\Network\I | UserName | REG_DWORD | 00000000 |
HKEY_CURRENT_USER\Network\I | ProviderName | REG_SZ | Microsoft Windows Network |
HKEY_CURRENT_USER\Network\I | ProviderType | REG_DWORD | 00020000 |
HKEY_CURRENT_USER\Network\I | ConnectionType | REG_DWORD | 00000001 |
HKEY_CURRENT_USER\Network\I | DeferFlags | REG_DWORD | 00000004 |