Environment variable may not expand %APPDATA% to the Application folder

Article translations Article translations
Article ID: 329308 - View products that this article applies to.
This article was previously published under Q329308
Expand all | Collapse all

SYMPTOMS

If you add %APPDATA% to any user or system environment variable by using the following method, %APPDATA% may not be resolved to the appropriate user application data folder:
  • Right-click My Computer, and then click Properties.
  • On the Advanced tab, click Environment Variables.
  • Add a new user or system environment variable named PATH. Set the Variable value entry to %APPDATA%.
  • Apply the settings.
If you then start a command session (Cmd.exe) and check the PATH environment variable by using the set path command, %APPDATA% may not be expanded to the appropriate user application folder. Instead, you see "%APPDATA%."

Problem example:
   C:\ >set PATH
   PATH=%APPDATA%
Working example:
   C:\ >set PATH
   PATH="C:\Documents and Settings\<UserName>\Application"

If %APPDATA% is not resolved correctly, and you try to start a program that is located in the user application folder, the program does not start because the program cannot be located in the path.

CAUSE

This behavior is caused by a problem in Shell32.dll.

WORKAROUND

To work around this problem, use the following method to set the environment variable:
  1. Right-click My Computer, and then click Manage.
  2. In the left pane, right-click Computer Management (Local), and then click Properties.
  3. Click the Advanced tab.
  4. Under Environment variables, click Settings.
  5. Add a new user or system environment variable named PATH, and set the Variable value entry to %APPDATA%.
You can use this method to set any user or system environment variable.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Properties

Article ID: 329308 - Last Review: February 28, 2007 - Revision: 2.3
APPLIES TO
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Professional Edition
  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Professional
  • Windows Server 2008 Datacenter without Hyper-V
  • Windows Server 2008 Enterprise without Hyper-V
  • Windows Server 2008 for Itanium-Based Systems
  • Windows Server 2008 Standard without Hyper-V
  • Windows Server 2008 Datacenter
  • Windows Server 2008 Enterprise
  • Windows Server 2008 Standard
  • Windows Web Server 2008
Keywords: 
kbprb KB329308

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com