Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 45 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:
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
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 '14 at 6:37
i used windows 7 64 bit and i couldn't see the show previous versions either.(fyi, the open button was not split since there are not previous version available)..any other solution.. – Lucky Feb 17 '15 at 8:25

Thanks indeed to Microsoft for eliminating "Restore Previous Versions". However, if you have system protection enabled on your system drive (usually C:) you can STILL get to the old versions back. Just because they took away the UI doesn't mean they took away the underlying backups.

First off, download Shadow Explorer. Then bow at their feet for writing it.

After installing it, you can navigate to the files referenced in the accepted answer by Mark Sowul. Note that you select the date/version you want to browser with the pulldown in shadow explorer: Shadow explorer date selector

  • To restore earlier env vars for the user account, go to c:\users[your username]\NTUSER.DAT
  • To restore earlier env vars for the system, go to C:\Windows\System32\config\RegBack\SYSTEM
  • Once you select the date/version you want and the file, right click the file and choose export
  • Export to a temporary folder
  • Then follow the instructions above for "Load Hive" above, but choose this temporary file you have just exported.
share|improve this answer

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

You must log in to answer this question.

protected by Community Sep 14 '13 at 16:21

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

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

Not the answer you're looking for? Browse other questions tagged .