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

Applies To
Windows Server 2008 R2 Enterprise Windows Server 2008 R2 Datacenter Windows Server 2008 R2 for Itanium-Based Systems Windows Server 2008 R2 Foundation Windows Server 2008 R2 Standard Windows Server 2008 R2 Web Edition Windows 7 Enterprise Windows 7 Home Basic Windows 7 Home Premium Windows 7 Professional Windows 7 Starter Windows 7 Ultimate Windows Vista Business Windows Vista Business 64-bit Edition Windows Vista Enterprise Windows Vista Enterprise 64-bit Edition Windows Vista Home Basic Windows Vista Home Basic 64-bit Edition Windows Vista Home Premium Windows Vista Home Premium 64-bit Edition Windows Vista Ultimate Windows Vista Ultimate 64-bit Edition Windows Server 2008 Datacenter Windows Server 2008 Datacenter without Hyper-V Windows Server 2008 Enterprise Windows Server 2008 Enterprise without Hyper-V Windows Server 2008 for Itanium-Based Systems Windows Server 2008 Foundation Windows Server 2008 Standard Windows Server 2008 Standard without Hyper-V

Symptoms

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:

    Note

    %windir% not found

  • When you try to display the environment variable in the System Properties dialog box, you receive the following error message:

    Note

    %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.

Cause

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.

Resolution

Hotfix information

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:

http:⁠//support.microsoft.com/contactus/?ws=support 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:

935791 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:

968849 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:

976932 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.

    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

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

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

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:

    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

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

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

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

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.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

More Information

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Additional file information

Additional file information for Windows Vista and for Windows Server 2008

Additional files for all supported x86-based versions of Windows Vista and of Windows Server 2008

File name Update.mum
File version Not Applicable
File size 2,414
Date (UTC) 09-Nov-2012
Time (UTC) 04:47
Platform Not Applicable
File name X86_microsoft-windows-profsvc_31bf3856ad364e35_6.0.6002.22970_none_fdd5cb8e4929a4db.manifest
File version Not Applicable
File size 38,816
Date (UTC) 09-Nov-2012
Time (UTC) 02:56
Platform Not Applicable
File name X86_microsoft-windows-shell32_31bf3856ad364e35_6.0.6002.22970_none_6e4d9eff287886f1.manifest
File version Not Applicable
File size 904,280
Date (UTC) 09-Nov-2012
Time (UTC) 02:53
Platform Not Applicable
File name X86_microsoft-windows-sysdm_31bf3856ad364e35_6.0.6002.22970_none_64a6a6e08bb97132.manifest
File version Not Applicable
File size 10,063
Date (UTC) 09-Nov-2012
Time (UTC) 02:53
Platform Not Applicable
File name X86_microsoft-windows-userenv_31bf3856ad364e35_6.0.6002.22970_none_9264de9461bf72d4.manifest
File version Not Applicable
File size 22,566
Date (UTC) 09-Nov-2012
Time (UTC) 02:57
Platform Not Applicable

Additional files for all supported x64-based versions of Windows Vista and of Windows Server 2008

File name Amd64_microsoft-windows-profsvc_31bf3856ad364e35_6.0.6002.22970_none_59f4671201871611.manifest
File version Not Applicable
File size 39,111
Date (UTC) 09-Nov-2012
Time (UTC) 03:52
Platform Not Applicable
File name Amd64_microsoft-windows-shell32_31bf3856ad364e35_6.0.6002.22970_none_ca6c3a82e0d5f827.manifest
File version Not Applicable
File size 906,212
Date (UTC) 09-Nov-2012
Time (UTC) 03:49
Platform Not Applicable
File name Amd64_microsoft-windows-sysdm_31bf3856ad364e35_6.0.6002.22970_none_c0c542644416e268.manifest
File version Not Applicable
File size 10,111
Date (UTC) 09-Nov-2012
Time (UTC) 03:49
Platform Not Applicable
File name Amd64_microsoft-windows-userenv_31bf3856ad364e35_6.0.6002.22970_none_ee837a181a1ce40a.manifest
File version Not Applicable
File size 22,608
Date (UTC) 09-Nov-2012
Time (UTC) 03:54
Platform Not Applicable
File name Update.mum
File version Not Applicable
File size 2,432
Date (UTC) 09-Nov-2012
Time (UTC) 04:47
Platform Not Applicable
File name Wow64_microsoft-windows-shell32_31bf3856ad364e35_6.0.6002.22970_none_d4c0e4d51536ba22.manifest
File version Not Applicable
File size 899,183
Date (UTC) 09-Nov-2012
Time (UTC) 02:45
Platform Not Applicable
File name X86_microsoft-windows-sysdm_31bf3856ad364e35_6.0.6002.22970_none_64a6a6e08bb97132.manifest
File version Not Applicable
File size 10,063
Date (UTC) 09-Nov-2012
Time (UTC) 02:53
Platform Not Applicable
File name X86_microsoft-windows-userenv_31bf3856ad364e35_6.0.6002.22970_none_9264de9461bf72d4.manifest
File version Not Applicable
File size 22,566
Date (UTC) 09-Nov-2012
Time (UTC) 02:57
Platform Not Applicable

Additional files for all supported IA-64-based versions of Windows Server 2008

File name Ia64_microsoft-windows-profsvc_31bf3856ad364e35_6.0.6002.22970_none_fdd76f844927add7.manifest
File version Not Applicable
File size 39,087
Date (UTC) 09-Nov-2012
Time (UTC) 02:24
Platform Not Applicable
File name Ia64_microsoft-windows-shell32_31bf3856ad364e35_6.0.6002.22970_none_6e4f42f528768fed.manifest
File version Not Applicable
File size 906,144
Date (UTC) 09-Nov-2012
Time (UTC) 02:22
Platform Not Applicable
File name Ia64_microsoft-windows-sysdm_31bf3856ad364e35_6.0.6002.22970_none_64a84ad68bb77a2e.manifest
File version Not Applicable
File size 10,087
Date (UTC) 09-Nov-2012
Time (UTC) 02:22
Platform Not Applicable
File name Ia64_microsoft-windows-userenv_31bf3856ad364e35_6.0.6002.22970_none_9266828a61bd7bd0.manifest
File version Not Applicable
File size 22,587
Date (UTC) 09-Nov-2012
Time (UTC) 02:25
Platform Not Applicable
File name Update.mum
File version Not Applicable
File size 2,257
Date (UTC) 09-Nov-2012
Time (UTC) 04:47
Platform Not Applicable
File name Wow64_microsoft-windows-shell32_31bf3856ad364e35_6.0.6002.22970_none_d4c0e4d51536ba22.manifest
File version Not Applicable
File size 899,183
Date (UTC) 09-Nov-2012
Time (UTC) 02:45
Platform Not Applicable
File name X86_microsoft-windows-sysdm_31bf3856ad364e35_6.0.6002.22970_none_64a6a6e08bb97132.manifest
File version Not Applicable
File size 10,063
Date (UTC) 09-Nov-2012
Time (UTC) 02:53
Platform Not Applicable
File name X86_microsoft-windows-userenv_31bf3856ad364e35_6.0.6002.22970_none_9264de9461bf72d4.manifest
File version Not Applicable
File size 22,566
Date (UTC) 09-Nov-2012
Time (UTC) 02:57
Platform Not Applicable

Additional file information for Windows 7 and for Windows Server 2008 R2

Additional files for all supported x86-based versions of Windows 7

File name X86_4c0dc5debc3492b57547ff706efc7496_31bf3856ad364e35_6.1.7601.21936_none_0c66cdab84c69c8d.manifest
File version Not applicable
File size 695
Date (UTC) 06-Mar-2012
Time (UTC) 14:50
File name X86_4f1dae35bbb9e93ec2e13080d177c1e8_31bf3856ad364e35_6.1.7601.21936_none_ac04358f6b0c76cb.manifest
File version Not applicable
File size 693
Date (UTC) 06-Mar-2012
Time (UTC) 14:50
File name X86_microsoft-windows-shell32_31bf3856ad364e35_6.1.7601.21936_none_6ea69802896a0899.manifest
File version Not applicable
File size 1,059,457
Date (UTC) 06-Mar-2012
Time (UTC) 06:20
File name X86_microsoft-windows-sysdm_31bf3856ad364e35_6.1.7601.21936_none_64ff9fe3ecaaf2da.manifest
File version Not applicable
File size 4,145
Date (UTC) 06-Mar-2012
Time (UTC) 06:19

Additional files for all supported x64-based versions of Windows 7 and of Windows Server 2008 R2

File name Amd64_1ee41c8879482f7ef008e05d93495b2d_31bf3856ad364e35_6.1.7601.21936_none_da95629eff7b0906.manifest
File version Not applicable
File size 1,040
Date (UTC) 06-Mar-2012
Time (UTC) 14:50
File name Amd64_a4fe0b9566c6311f79aa30632d6f2283_31bf3856ad364e35_6.1.7601.21936_none_2673b4e6d038c9d8.manifest
File version Not applicable
File size 1,034
Date (UTC) 06-Mar-2012
Time (UTC) 14:50
File name Amd64_cb092d4d20eb78dd8fa1dd75efb41835_31bf3856ad364e35_6.1.7601.21936_none_0f7f391e55a47b51.manifest
File version Not applicable
File size 699
Date (UTC) 06-Mar-2012
Time (UTC) 14:50
File name Amd64_microsoft-windows-shell32_31bf3856ad364e35_6.1.7601.21936_none_cac5338641c779cf.manifest
File version Not applicable
File size 1,058,443
Date (UTC) 06-Mar-2012
Time (UTC) 07:00
File name Amd64_microsoft-windows-sysdm_31bf3856ad364e35_6.1.7601.21936_none_c11e3b67a5086410.manifest
File version Not applicable
File size 4,149
Date (UTC) 06-Mar-2012
Time (UTC) 07:00
File name Wow64_microsoft-windows-shell32_31bf3856ad364e35_6.1.7601.21936_none_d519ddd876283bca.manifest
File version Not applicable
File size 1,054,916
Date (UTC) 06-Mar-2012
Time (UTC) 05:55

Additional files for all supported IA-64-based versions of Windows Server 2008 R2

File name Ia64_d88a33ae9f64e1201229dbeb269ce630_31bf3856ad364e35_6.1.7601.21936_none_d2cd106ff126c5e2.manifest
File version Not applicable
File size 1,032
Date (UTC) 06-Mar-2012
Time (UTC) 14:50
File name Ia64_f60a4af9383cc624321b07801b50bf82_31bf3856ad364e35_6.1.7601.21936_none_1d2b3a101374d959.manifest
File version Not applicable
File size 1,038
Date (UTC) 06-Mar-2012
Time (UTC) 14:50
File name Ia64_microsoft-windows-shell32_31bf3856ad364e35_6.1.7601.21936_none_6ea83bf889681195.manifest
File version Not applicable
File size 1,058,441
Date (UTC) 06-Mar-2012
Time (UTC) 06:34
File name Ia64_microsoft-windows-sysdm_31bf3856ad364e35_6.1.7601.21936_none_650143d9eca8fbd6.manifest
File version Not applicable
File size 4,147
Date (UTC) 06-Mar-2012
Time (UTC) 06:34
File name Wow64_microsoft-windows-shell32_31bf3856ad364e35_6.1.7601.21936_none_d519ddd876283bca.manifest
File version Not applicable
File size 1,054,916
Date (UTC) 06-Mar-2012
Time (UTC) 05:55