Share via

Cannot recover the path variable

Anonymous
2022-02-16T19:09:25+00:00

I was editing the Path variable in the system section and I accidentally deleted the whole Path variable from System section, I tried using echo %PATH% to restore the variable but, it doesn't work as I was having Python installed working fine with command prompt but now it says Python not found, but the folder is still in the variable value.

Please tell how can I get my variable Path back working as before. Pls reply

Windows for home | Windows 10 | Settings

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. DaveM121 876.9K Reputation points Independent Advisor
    2022-02-16T20:56:52+00:00

    Hi Priyanshu

    Here is the base set of Path variables from my PC:

    C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;%SYSTEMROOT%\System32\OpenSSH;

    If needs be, create that Path Variable, then click Edit Text and paste the above into that.

    Was this answer helpful?

    4 people found this answer helpful.
    0 comments No comments

8 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-02-16T20:50:06+00:00

    I have tried to find them on the internet, because I do not have another PC but was not able to get, is there any website where these values are provided ?

    Was this answer helpful?

    0 comments No comments
  2. DaveM121 876.9K Reputation points Independent Advisor
    2022-02-16T20:47:30+00:00

    Hi Priyanshu

    Yes, there are a default set of entries in that Path variable that exist on all Windows PC;s

    You can copy them out to a text file by double clicking the Path Variable on another PC, then click 'Edit as Text'

    Then paste that long string into Notepad, then edit out the specific paths to that PC, they usually are related to installed software.

    Then on your PC, create a new system variable, name it Path and using the 'Edit as Text' option paste those values into that variable.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2022-02-16T20:40:19+00:00

    Thanks for the reply,

    I found that for the system section, the Path variable have some common values fo all windows 10, some values are like %SystemRoot% or something like that, it is common for all systems, if I could get only those values, maybe it will be fixed. There were 100 of system restore on my PC so I deleted them a couple of weeks ago.

    Was this answer helpful?

    0 comments No comments
  4. DaveM121 876.9K Reputation points Independent Advisor
    2022-02-16T19:43:04+00:00

    Hi Priyanshu,

    I am Dave, I will help you with this.

    The PATH variable will be different on most PC's so you cannot copy that out of another PC, the only real hope you would have is to perform a system restore to a date prior to when you deleted that variable, or if you had a Registry backup you could restore from.

    Was this answer helpful?

    0 comments No comments