I accidentally deleted the Path environment variable by creating a new one with Path name. How can i restore my old Path environment variable?
|
|
I lost my PATH with a program install earlier today, but with all the existing programs already running, it was easy to get it back. If you have a command window open, run:
If you don't, you can look at the environment variables of currently-running programs with Process Explorer (procexp). |
|||||||||||||||||||||
|
|
I followed the advice in the answer to a related question here and recovered my previous path setting as of this morning using regedit. Expanding a bit on that answer, here's how I did it. (Read the linked answer to get the full instructions, I don't provide all the details here.) I selected my earliest backup from today (11:43 AM timestamp in 'Today' section)
and examined the earliest ControlSet within the HKEY_LOCAL_MACHINE/System node of that copy of the registry file, ControlSet002:
and copied out the previous value of my path variable from the key Control\Session Manager\Environment\Path within that level.
Your mileage may vary, as I don't know exactly what triggers the backup of the registry. |
|||||||||
|
|
You could do a system restore.
|
|||
|
|
|
Another way to restore the default Usage would be:
It is a freeware tool to add, delete, clean or restore the |
|||||||||
|
|
I have just retrieved it by doing as follows: My previous Path settings was still on the dos cmd prompt screen. So right click on it with your mouse. Take 'Select All'. This copies your screen. Open Notepad, and paste. Now highlight the Path definition in notepad, right click and copy. Go back to dos cmd prompt screen. right click and paste This has worked for me so Good Luck! |
|||||
|




