microsoft.com Home  
Microsoft
http://www.microsoft.com/office/ork  
Microsoft Office 2000 Resource Kit Home
 Managing and Supporting Office 2000
 Ongoing Configuration of Office on Users' Computers
Managing Users' Options with System Policies
Locking Down an Office Configuration
Using the System Policy Editor
Office 2000 System Policy Reference
Office Registry API
 Helping Users Help Themselves
 Managing Security
 Overview of Tools and Utilities
Glossary
Index
Managing Users’ Options with System Policies

Using Environment Variables in System Policies

Windows 95/98, Windows NT 4.0, and Windows 2000 all include the capability to use environment variables in the Windows registry to take the place of actual file names, paths, or other changeable values. Environment variables in the Windows registry take the REG_EXPAND_SZ data type.

Although Windows system policies have used environment variables for some time, Office 97 did not recognize the data type REG_EXPAND_SZ, so you could not use environment variables in Office 97 system policies. However, you can use environment variables in Office 2000.

For example, the Default file location policy for Excel 2000 allows you to specify a default path to the location where you want users to store Excel files. If you want to store users’ Excel files under their user names on the network, you can use a network drive and the following environment variable:

X:\%USERNAME%

When you distribute the policy, the environment variable is written to each user’s registry. Office 2000 recognizes that %USERNAME% is an environment variable and expands it to whatever the %USERNAME% variable is set to on the user’s computer. So Office 2000 expands this example to X:\UserA for User A, X:\UserB for User B, and so on.

You could also use any other appropriately defined environment variable to set Default file location to a particular path or folder. Because Office 2000 recognizes the REG_EXPAND_SZ data type, you can use environment variables that exist by default in the operating system or that you set on your own.

Note   Windows 95/98 does not create environment variables automatically. You must create and define variables manually so that they resolve correctly for each user. For example, to create the %USERNAME% environment variable for Windows 95/98 clients, use a Windows NT logon script.

Top

See also

Several Office 2000 system policies accept environment variables. For a list of these policies, see Office 2000 System Policies That Accept Environment Variables.

You can use environment variables in place of directory paths or specific user information. For more information, see the Windows NT Server Resource Kit or the Windows NT Workstation Resource Kit.


Topic Contents
Next
Previous

Topic Contents   |   Previous   |   Next   |   Top

  Friday, March 5, 1999
© 1999 Microsoft Corporation. All rights reserved. Terms of use.

License