Error messages after you change the 2047 character limit in an environment variable on a computer that is running Windows Vista, Windows 7, Windows Server 2008 or Windows Server 2008 R2
After you enable an environment variable to contain more than 2047 characters on a computer that is running Windows Vista, Windows Server 2008, Windows 7 or Windows Server 2008 R2, you experience the following symptoms:
When you try to run an application at a command prompt, you receive the following error message:
%windir% not found
When you try to display the environment variable in the System Properties dialog box, you receive the following error message:
%windir% missing
Note These issues do not occur if you restart the computer or log off and then log on the computer after you change the character limit in the environment variable.
This issue occurs because the environment variable is limited to 2047 characters. When you change the system environment variables, processes, such as explorer.exe, receive a WM_SETTINGCHANGE message as notification of the change. The Shell32.dll file processes the notification by enumerating all the environment variables from the registry key and setting up a new environment block. The enumerating function assumes that the environment variable is limited to 2048 characters, and the enumerating function exists out for a PATH variable that is larger than 2048 characters. Therefore, the partly initialized environment block affects the initialization and functionality of other applications.
A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.
If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.
Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website:
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
Prerequisites
To apply this hotfix, you must be running one of the following operating systems:
Windows Vista Service Pack 2 (SP2)
Windows Server 2008 Service Pack 2 (SP2)
Windows 7
Windows 7 Service Pack 1 (SP1)
Windows Server 2008 R2
Windows Server 2008 R2 Service Pack 1 (SP1)
For more information about how to obtain a Windows Vista service pack, click the following article number to view the article in the Microsoft Knowledge Base:
How to obtain the latest Windows Vista service pack
For more information about how to obtain a Windows Server 2008 service pack, click the following article number to view the article in the Microsoft Knowledge Base:
How to obtain the latest service pack for Windows Server 2008
For more information about how to obtain a Windows 7 or Windows Server 2008 R2 service pack, click the following article number to view the article in the Microsoft Knowledge Base:
Information about Service Pack 1 for Windows 7 and for Windows Server 2008 R2
Registry information
To apply this hotfix, you do not have to make any changes to the registry.
Restart requirement
You must restart the computer after you apply this hotfix.
Hotfix replacement information
This hotfix does not replace a previously released hotfix.
File information
The global version of this hotfix installs files that have the attributes that are listed in the following tables. The dates and the times for these files are listed in Coordinated Universal Time (UTC). The dates and the times for these files on your local computer are displayed in your local time together with your current daylight saving time (DST) bias. Additionally, the dates and the times may change when you perform certain operations on the files.
Windows Vista and Windows Server 2008 file information notes
Important Windows Vista hotfixes and Windows Server 2008 hotfixes are included in the same packages. However, only "Windows Vista" is listed on the Hotfix Request page. To request the hotfix package that applies to one or both operating systems, select the hotfix that is listed under "Windows Vista" on the page. Always refer to the "Applies To" section in articles to determine the actual operating system that each hotfix applies to.
The files that apply to a specific product, SR_Level (RTM, SPn), and service branch (LDR, GDR) can be identified by examining the file version numbers as shown in the following table.
Collapse this tableExpand this table
Version
Product
SR_Level
Service branch
6.0.600
2
.
22xxx
Windows Vista and Windows Server 2008
SP2
LDR
The MANIFEST files (.manifest) and the MUM files (.mum) that are installed for each environment are listed separately in the "Additional file information for Windows Server 2008 and for Windows Vista" section. MUM files and MANIFEST files, and the associated security catalog (.cat) files, are extremely important to maintain the state of the updated components. The security catalog files, for which the attributes are not listed, are signed with a Microsoft digital signature.
For all supported x86-based versions of Windows Server 2008 and of Windows Vista
Collapse this tableExpand this table
File name
File version
File size
Date
Time
Platform
Profprov.dll
6.0.6002.22970
29,184
09-Nov-2012
02:41
x86
Profsvc.dll
6.0.6002.22970
155,648
09-Nov-2012
02:41
x86
Userprofilewmiprovider.mof
Not Applicable
10,702
08-Nov-2012
23:16
Not Applicable
Shell32.dll
6.0.6002.22970
11,589,120
09-Nov-2012
02:42
x86
Sysdm.cpl
6.0.6002.22970
242,688
09-Nov-2012
02:42
Not Applicable
Userenv.dll
6.0.6002.22970
108,544
09-Nov-2012
02:42
x86
For all supported x64-based versions of Windows Server 2008 and of Windows Vista
Collapse this tableExpand this table
File name
File version
File size
Date
Time
Platform
Profprov.dll
6.0.6002.22970
33,280
09-Nov-2012
03:36
x64
Profsvc.dll
6.0.6002.22970
180,736
09-Nov-2012
03:36
x64
Userprofilewmiprovider.mof
Not Applicable
10,702
08-Nov-2012
23:17
Not Applicable
Shell32.dll
6.0.6002.22970
12,904,448
09-Nov-2012
03:36
x64
Sysdm.cpl
6.0.6002.22970
268,288
09-Nov-2012
03:37
Not Applicable
Userenv.dll
6.0.6002.22970
137,216
09-Nov-2012
03:37
x64
Shell32.dll
6.0.6002.22970
11,589,120
09-Nov-2012
02:42
x86
Sysdm.cpl
6.0.6002.22970
242,688
09-Nov-2012
02:42
Not Applicable
Userenv.dll
6.0.6002.22970
108,544
09-Nov-2012
02:42
x86
For all supported IA-64-based versions of Windows Server 2008
Collapse this tableExpand this table
File name
File version
File size
Date
Time
Platform
Profprov.dll
6.0.6002.22970
76,288
09-Nov-2012
02:14
IA-64
Profsvc.dll
6.0.6002.22970
406,016
09-Nov-2012
02:14
IA-64
Userprofilewmiprovider.mof
Not Applicable
10,702
08-Nov-2012
23:05
Not Applicable
Shell32.dll
6.0.6002.22970
19,095,040
09-Nov-2012
02:14
IA-64
Sysdm.cpl
6.0.6002.22970
476,672
09-Nov-2012
02:15
Not Applicable
Userenv.dll
6.0.6002.22970
283,648
09-Nov-2012
02:15
IA-64
Shell32.dll
6.0.6002.22970
11,589,120
09-Nov-2012
02:42
x86
Sysdm.cpl
6.0.6002.22970
242,688
09-Nov-2012
02:42
Not Applicable
Userenv.dll
6.0.6002.22970
108,544
09-Nov-2012
02:42
x86
Windows 7 and Windows Server 2008 R2 file information notes
Important Windows 7 hotfixes and Windows Server 2008 R2 hotfixes are included in the same packages. However, hotfixes on the Hotfix Request page are listed under both operating systems. To request the hotfix package that applies to one or both operating systems, select the hotfix that is listed under "Windows 7/Windows Server 2008 R2" on the page. Always refer to the "Applies To" section in articles to determine the actual operating system that each hotfix applies to.
The files that apply to a specific product, milestone (RTM, SPn), and service branch (LDR, GDR) can be identified by examining the file version numbers as shown in the following table:
Collapse this tableExpand this table
Version
Product
Milestone
Service branch
6.1.760
1.21xxx
Windows 7 and Windows Server 2008 R2
SP1
LDR
GDR service branches contain only those fixes that are widely released to address widespread, critical issues. LDR service branches contain hotfixes in addition to widely released fixes.
The MANIFEST files (.manifest) and the MUM files (.mum) that are installed for each environment are listed separately in the "Additional file information for Windows 7 and for Windows Server 2008 R2" section. MUM and MANIFEST files, and the associated security catalog (.cat) files, are critical to maintaining the state of the updated component. The security catalog files, for which the attributes are not listed, are signed with a Microsoft digital signature.
For all supported x86-based versions of Windows 7
Collapse this tableExpand this table
File name
File version
File size
Date
Time
Shell32.dll
6.1.7601.21936
12,874,752
06-Mar-2012
05:22
Sysdm.cpl
6.1.7601.21936
326,656
06-Mar-2012
05:18
For all supported x64-based versions of Windows 7 and of Windows Server 2008 R2
Collapse this tableExpand this table
File name
File version
File size
Date
Time
Platform
Shell32.dll
6.1.7601.21936
14,174,720
06-Mar-2012
06:23
x64
Sysdm.cpl
6.1.7601.21936
353,280
06-Mar-2012
06:16
Not Applicable
Shell32.dll
6.1.7601.21936
12,874,752
06-Mar-2012
05:22
x86
For all supported IA-64-based versions of Windows Server 2008 R2
Collapse this tableExpand this table
File name
File version
File size
Date
Time
Platform
Shell32.dll
6.1.7601.21936
21,190,656
06-Mar-2012
05:21
IA-64
Sysdm.cpl
6.1.7601.21936
570,368
06-Mar-2012
05:15
Not Applicable
Shell32.dll
6.1.7601.21936
12,874,752
06-Mar-2012
05:22
x86
More information
After you apply this hotfix, the maximum length of an environment variable is increased from 2047 characters to 4095 characters, and you can enter 2047 characters in an environment variable in the Environment Variables dialog box. In the Environment Variables dialog box, the maximum number of characters that are displayed is 4095. If an existing value contains more than 2047 characters, you cannot enter additional data. However, you can delete the characters that are displayed. If a system environment variable is set to a value that is greater than 4095 characters, only the first 4095 characters are displayed. In this situation, when you click OK, the value is truncated permanently to 4095 characters, and the value is updated and stored in the registry.