Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Recently a (badly written) piece of software erased my PATH variable. I've been installing software for years and recovering every single entry would be cumbersome. An even more cumbersome solution would be to restore from previous system restore point. Any ideas on how to get the PATH variable alone from the restore point?

share|improve this question

2 Answers 2

up vote 22 down vote accepted

You can mount the old version of the registry.

  1. Open Regedit

Restoring User PATH:
2. Select HKEY_USERS
3. File->Load Hive
4. Navigate to your user folder, click the little button to the right of "Open" for "Show Previous Versions"
5. Select appropriate revision
6. Select NTUSER.DAT (must have Show Hidden Files enabled)
7. Give it a name (e.g. "Old")
8. Navigate to "Old"\Environment

Restoring System PATH:
2. Select HKEY_LOCAL_MACHINE
3. File->Load Hive
4. Navigate to your C:\Windows\System32\config\RegBack, click the little button to the right of "Open" for "Show Previous Versions": enter image description here
5. Select appropriate revision
6. Select SYSTEM.OLD
7. Give it a name (e.g. "Old")
8. Navigate to HKEY_LOCAL_MACHINE\"Old"\ControlSet001\Control\Session Manager\Environment
9. Open the PATH value and copy it to clipboard, then paste into system environment variables screen.

Note that for System, depending on how long ago this was, you can just go back into HKLM\(old control set version)\Control\Session Manager\Environment without loading an old hive, but this is a generally useful way to apply "Restore Previous Versions" to the registry.

'Show Previous Versions' explained, in detail with screenshots.

Special thanks to Microsoft for removing "Restore Previous Versions" from Windows 8.

share|improve this answer
    
Niice. That's what I was looking for. Thanks. –  Kiril Stefanov Apr 2 '11 at 11:48
    
This might seem naive but what little button to right of open? –  Ron Jan 22 '13 at 18:39
    
The 'open' button is split, it looks like Open | \/ - click the little thing on the right. –  Mark Sowul Jan 24 '13 at 19:02
    
Awesome, thanks! –  RobotCaleb Nov 21 '13 at 3:39
1  
Windows 8.1: "click the little button to the right of "Open" for "Show Previous Versions" <-- No such thing based on these directions –  rainabba Jan 1 at 6:37

Well, this would be kinda hackish, but you could restore back to get the path and restore forward again to your current state.

share|improve this answer

protected by Community Sep 14 '13 at 16:21

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.