Microsoft KB Archive/261169

From BetaArchive Wiki

How to Change Environment Variables in Windows 95/Windows 98



The information in this article applies to:


  • Microsoft Windows 98
  • Microsoft Windows 98 Second Edition
  • Microsoft Windows 95



IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.


SUMMARY

This article describes how to change environment variables in Windows 95/Windows 98. For example, you may need to change the TEMP environment variable to point to a different drive or folder.



MORE INFORMATION

There are two methods for changing environment variables.

Using the SET Command

To change an environment variable immediately, use the set command at a command prompt. For example, to change the TEMP environment variable to point to the D:\Temp folder, type the following line at a command prompt:

set temp=d:\temp

This command changes the environment variable setting immediately. You do not need to restart the computer. If you want to retain the environment variable setting by using the set command, add the command to the Autoexec.bat file, or create a batch file that runs at startup.

Using Registry Editor

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT or Windows 2000, you should also update your Emergency Repair Disk (ERD).

You can modify environment variables by editing the registry. To do so, use the following steps:

  1. Start Registry Editor (Regedit.exe).
  2. Locate and click the following key:
  3. Modify the environment value that you want to change by clicking the value, and then clicking Modify on the Edit menu. Change the value data to the appropriate value.
  4. Quit Registry Editor.
  5. Restart the computer.

Additional query words:

Keywords : kbenv kbtool win95 win98 win98se
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbhowto
Technology : kbvcSearch


Last Reviewed: June 14, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.