FG
💻 Software

Windows 7's PATH and environment variables are corrupted

Fresh5 days ago
Mar 15, 202675365 views
Confidence Score1%
1%

Problem

I have no clue, but lately I've been having this problem. After running my workstation suddenly something destroys PATH and lots of stuff stops working. Initially, my path had MANY directories listed (I use Windows 7 as a development box) and after some time, I only had 3-4 directories listed in my path left. I can't even open the System Properties dialog where I can see environment variables (because it uses shell variables to start it and it doesn't work). In short, I reboot every time. Any ideas what might cause that problem? I didn't run anything new/unusual lately. Only VmWare (but I've been using it in the past and didn't have that problem back then). I just checked, even is not defined. WTF?!

Error Output

%WINDIR%

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Windows 7's PATH and environment variables are corrupted

Low Risk

From my blog Bottom line, if your PATH environment variable is more than 2048 characters it (and WINDIR) stop being visible in many contexts. I fixed it by manually running c:\windows\system32\systempropertiesadvanced.exe and deleting one entry from my PATH to put me under 2048 chars. New cmd windows work just fine. Update: This similar question claims 2047 is the max, and elaborates on expansion rules

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment