Recover lost PATH variable on Windows
Goal
Recover your Windows PATH variable after it has been corrupted or accidentally cleared.
Solution
Use a running application to access its inherited environment variables. Any application launched before the PATH was broken still has the correct value in memory.
Steps
1. Open a file dialog from a running application (e.g., Chrome):
Press Ctrl+O to open the file picker.
2. Launch CMD from the file picker:
Click the address bar and type:
cmd
Press Enter. This opens a command prompt that inherits Chrome’s environment.
3. Display the PATH variable:
echo %PATH%
Copy this value to restore your PATH in System Environment Variables.