Deleted Path environment variable, how to restore?












22














I accidentally deleted the Path environment variable by creating a new one with Path name.
How can i restore my old Path environment variable?










share|improve this question
























  • Remember that each Windows console session has its own PATH environment variable, which can be displayed or changed using the PATH command. But if you close the console and open a new one, the original system PATH will be restored. I'm not sure if this is the case with an elevated console session.
    – Baodad
    Aug 9 '16 at 18:29
















22














I accidentally deleted the Path environment variable by creating a new one with Path name.
How can i restore my old Path environment variable?










share|improve this question
























  • Remember that each Windows console session has its own PATH environment variable, which can be displayed or changed using the PATH command. But if you close the console and open a new one, the original system PATH will be restored. I'm not sure if this is the case with an elevated console session.
    – Baodad
    Aug 9 '16 at 18:29














22












22








22


15





I accidentally deleted the Path environment variable by creating a new one with Path name.
How can i restore my old Path environment variable?










share|improve this question















I accidentally deleted the Path environment variable by creating a new one with Path name.
How can i restore my old Path environment variable?







windows windows-registry environment-variables path






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 5 '15 at 15:37









ElektroStudios

69351444




69351444










asked Dec 24 '12 at 11:46









deno

111113




111113












  • Remember that each Windows console session has its own PATH environment variable, which can be displayed or changed using the PATH command. But if you close the console and open a new one, the original system PATH will be restored. I'm not sure if this is the case with an elevated console session.
    – Baodad
    Aug 9 '16 at 18:29


















  • Remember that each Windows console session has its own PATH environment variable, which can be displayed or changed using the PATH command. But if you close the console and open a new one, the original system PATH will be restored. I'm not sure if this is the case with an elevated console session.
    – Baodad
    Aug 9 '16 at 18:29
















Remember that each Windows console session has its own PATH environment variable, which can be displayed or changed using the PATH command. But if you close the console and open a new one, the original system PATH will be restored. I'm not sure if this is the case with an elevated console session.
– Baodad
Aug 9 '16 at 18:29




Remember that each Windows console session has its own PATH environment variable, which can be displayed or changed using the PATH command. But if you close the console and open a new one, the original system PATH will be restored. I'm not sure if this is the case with an elevated console session.
– Baodad
Aug 9 '16 at 18:29










7 Answers
7






active

oldest

votes


















51














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:



echo %PATH%


If you don't, you can look at the environment variables of currently-running programs with Process Explorer (procexp).






share|improve this answer

















  • 3




    HOLY CRAP. I dont know why this didn't occur to me but you just saved me a humungous headache. TY.
    – dudewad
    Mar 20 '15 at 20:18






  • 2




    The "Ahah!" moment for me back when I posted this was quite rewarding.
    – Thomas G. Mayfield
    Mar 20 '15 at 22:07






  • 2




    Oh, you from the past. Thank you so much for unscrewing my total screw up. I was lost but because of you I saw the light and found the path again.
    – Sage Pourpre
    Nov 28 '15 at 4:17






  • 7




    Excellent answer. Saved me from restoring a backup. May I share a potentially not-so-obvious trick of how to open a command window if you don't have one open. If you have a program that has an open dialog (I used Chrome since it was open before I lost the path), hit Ctrl-O to open a website. Navigate to C:Windowssystem32 and find cmd.exe. Right-click on cmd.exe and click Open. This will bring up a command prompt with the environment variables of the software (chrome in this instance) and you can echo %path% to get your old env variables!
    – triadiktyo
    Oct 3 '16 at 14:28








  • 2




    YOU SIR ARE A GENIUS, If I could up vote you more than once, I surely would. After I installed a bit of software that wiped out my entire system path 2 days ago, I looked at my task bar a realized I had a cmd that had been open for about a week, and your "echo %PATH%" has not only saved my bacon, but saved me from several hours of painful path reconstruction for VIsual Studio, Dotnet, Office and many other large applications. EVERYBODY PLEASE VOTE THIS GUY UP!!!!
    – shawty
    Feb 28 '17 at 11:02



















21














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)



Example of previous versions of RegBack



and examined the earliest ControlSet within the HKEY_LOCAL_MACHINE/System node of that copy of the registry file, ControlSet002:



enter image description here



and copied out the previous value of my path variable from the key ControlSession ManagerEnvironmentPath within that level.



enter image description here



Your mileage may vary, as I don't know exactly what triggers the backup of the registry.






share|improve this answer



















  • 1




    Even easier, a note from the old question "Note that for System, depending on how long ago this was, you can just go back into HKLM(old control set version)ControlSession ManagerEnvironment without loading an old hive"
    – Jahmic
    Mar 12 '14 at 6:38










  • What is MOLD? When i go to the previous versions of Regback, I see one previous folder, and despite the depth of the linked answer, I still don't know what to do. Also, how did you manage to open the HKEY_LOCAL_MACHINE/System node of any Regback folder?
    – Ungeheuer
    Oct 18 '16 at 2:50












  • Where are those backups stored?
    – Shimmy
    Nov 3 '17 at 1:28



















7














You could do a system restore.




To restore your PC using System Restore



Swipe in from the right edge of the screen, and then tap Search.
(If you're using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, and then click Search.) Enter
Recovery in the search box, tap or click Settings, and then tap or
click Recovery.



Tap or click Open System Restore, and follow the prompts.







share|improve this answer





























    2















    • From the start menu, open Run (or press ⊞ Win+R).

    • Type regedit


      • Find HKEY_LOCAL_MACHINE folder

      • Go to the SYSTEM folder

      • Go to the ControlSet002 folder

      • Go to Control folder

      • Go to Session Manager

      • Go to Environment folder

      • Then, inside Environment folder, double click Path




    The previous Path should be there.






    share|improve this answer



















    • 1




      This should be the accepted answer. The one chosen works for short variables and doesn't allow for copy and paste. Here you can do it as needed.
      – javydreamercsw
      Jun 20 '17 at 19:56






    • 1




      It shows the current path. Not the old one.
      – Shimmy
      Nov 3 '17 at 1:26










    • it doesnt show me the path at all :(
      – Ayyash
      Oct 26 at 10:36



















    0














    Another way to restore the default PATH, for both current user and machine user, is to use an useful application that I developed in .Net platform, with name PATHS.



    Usage would be:



    PATHS.exe /Restore


    It is a freeware tool to add, delete, clean or restore the PATH and PATHEXT, it can be downloaded here, including source-code:



    http://www.mediafire.com/download/ffuxgwezf4jd5c0/PATHS.rar



    enter image description here



    enter image description here






    share|improve this answer

















    • 2




      Do you have a website with a more reliable download/updates? Can you confirm this is the latest version? Are there known bugs?
      – beppe9000
      Jul 31 '16 at 17:54






    • 3




      The title makes me want to play old nineties games.
      – xdhmoore
      Oct 20 '16 at 2:10






    • 1




      Is it open source?
      – Shimmy
      Nov 3 '17 at 1:26



















    0














    I only discovered the problem with the environment variables days after they got ruined by the installation of an outdated app. But I still had a full registry backup. There one can find all the system environment variables as off the date of the backup. These can then be compared with the current situation as per System / Advanced system settings / Environment variables. Depending upon how recent the backup is, and assuming no environment variable changes since then, you are ok. Worst case is that you'll have to reinstall the apps that you had installed after the registry backup and before losing your path data, which is typically less work than a restore. Below I'll explain how this can be done.




    1. Open the backup.reg file with Notepad++ (free and excellent editor). Find HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Control/Session Manager/Environment. If that does not work try ControlSet002 or higher.


    2. Copy paste the hex(2) hash data for the PATH into a new Notepad++ window. Find/replace all ',' (commas w/o the quotes) with ' ' and all '00' with '', and all double spaces ' ' with a single space ' '. You should now be left with "pure hex" without commas or zeros as separator.


    3. Open http://www.rapidtables.com/convert/number/hex-to-ascii.htm . This is a hex to ascii converter. Copy paste the "pure hex" data into the hex window and click convert. You can now see your path data, and copy paste them into Notepad, compare with the current version, and add the missing data. You're back in business!


    4. As a bonus you might also want to check on the other environment variables by comparing the data in the Notepad++ backup.reg with the current values. Missing data can be retrieved in the same way as explained above.







    share|improve this answer





























      -1














      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!






      share|improve this answer





















      • This duplicates information already present in another answer, and pre-supposes that one happens to have a command prompt already open in this situation.
        – bertieb
        Sep 5 '15 at 15:38











      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "3"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f523688%2fdeleted-path-environment-variable-how-to-restore%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      7 Answers
      7






      active

      oldest

      votes








      7 Answers
      7






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      51














      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:



      echo %PATH%


      If you don't, you can look at the environment variables of currently-running programs with Process Explorer (procexp).






      share|improve this answer

















      • 3




        HOLY CRAP. I dont know why this didn't occur to me but you just saved me a humungous headache. TY.
        – dudewad
        Mar 20 '15 at 20:18






      • 2




        The "Ahah!" moment for me back when I posted this was quite rewarding.
        – Thomas G. Mayfield
        Mar 20 '15 at 22:07






      • 2




        Oh, you from the past. Thank you so much for unscrewing my total screw up. I was lost but because of you I saw the light and found the path again.
        – Sage Pourpre
        Nov 28 '15 at 4:17






      • 7




        Excellent answer. Saved me from restoring a backup. May I share a potentially not-so-obvious trick of how to open a command window if you don't have one open. If you have a program that has an open dialog (I used Chrome since it was open before I lost the path), hit Ctrl-O to open a website. Navigate to C:Windowssystem32 and find cmd.exe. Right-click on cmd.exe and click Open. This will bring up a command prompt with the environment variables of the software (chrome in this instance) and you can echo %path% to get your old env variables!
        – triadiktyo
        Oct 3 '16 at 14:28








      • 2




        YOU SIR ARE A GENIUS, If I could up vote you more than once, I surely would. After I installed a bit of software that wiped out my entire system path 2 days ago, I looked at my task bar a realized I had a cmd that had been open for about a week, and your "echo %PATH%" has not only saved my bacon, but saved me from several hours of painful path reconstruction for VIsual Studio, Dotnet, Office and many other large applications. EVERYBODY PLEASE VOTE THIS GUY UP!!!!
        – shawty
        Feb 28 '17 at 11:02
















      51














      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:



      echo %PATH%


      If you don't, you can look at the environment variables of currently-running programs with Process Explorer (procexp).






      share|improve this answer

















      • 3




        HOLY CRAP. I dont know why this didn't occur to me but you just saved me a humungous headache. TY.
        – dudewad
        Mar 20 '15 at 20:18






      • 2




        The "Ahah!" moment for me back when I posted this was quite rewarding.
        – Thomas G. Mayfield
        Mar 20 '15 at 22:07






      • 2




        Oh, you from the past. Thank you so much for unscrewing my total screw up. I was lost but because of you I saw the light and found the path again.
        – Sage Pourpre
        Nov 28 '15 at 4:17






      • 7




        Excellent answer. Saved me from restoring a backup. May I share a potentially not-so-obvious trick of how to open a command window if you don't have one open. If you have a program that has an open dialog (I used Chrome since it was open before I lost the path), hit Ctrl-O to open a website. Navigate to C:Windowssystem32 and find cmd.exe. Right-click on cmd.exe and click Open. This will bring up a command prompt with the environment variables of the software (chrome in this instance) and you can echo %path% to get your old env variables!
        – triadiktyo
        Oct 3 '16 at 14:28








      • 2




        YOU SIR ARE A GENIUS, If I could up vote you more than once, I surely would. After I installed a bit of software that wiped out my entire system path 2 days ago, I looked at my task bar a realized I had a cmd that had been open for about a week, and your "echo %PATH%" has not only saved my bacon, but saved me from several hours of painful path reconstruction for VIsual Studio, Dotnet, Office and many other large applications. EVERYBODY PLEASE VOTE THIS GUY UP!!!!
        – shawty
        Feb 28 '17 at 11:02














      51












      51








      51






      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:



      echo %PATH%


      If you don't, you can look at the environment variables of currently-running programs with Process Explorer (procexp).






      share|improve this answer












      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:



      echo %PATH%


      If you don't, you can look at the environment variables of currently-running programs with Process Explorer (procexp).







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Aug 16 '14 at 18:58









      Thomas G. Mayfield

      7771712




      7771712








      • 3




        HOLY CRAP. I dont know why this didn't occur to me but you just saved me a humungous headache. TY.
        – dudewad
        Mar 20 '15 at 20:18






      • 2




        The "Ahah!" moment for me back when I posted this was quite rewarding.
        – Thomas G. Mayfield
        Mar 20 '15 at 22:07






      • 2




        Oh, you from the past. Thank you so much for unscrewing my total screw up. I was lost but because of you I saw the light and found the path again.
        – Sage Pourpre
        Nov 28 '15 at 4:17






      • 7




        Excellent answer. Saved me from restoring a backup. May I share a potentially not-so-obvious trick of how to open a command window if you don't have one open. If you have a program that has an open dialog (I used Chrome since it was open before I lost the path), hit Ctrl-O to open a website. Navigate to C:Windowssystem32 and find cmd.exe. Right-click on cmd.exe and click Open. This will bring up a command prompt with the environment variables of the software (chrome in this instance) and you can echo %path% to get your old env variables!
        – triadiktyo
        Oct 3 '16 at 14:28








      • 2




        YOU SIR ARE A GENIUS, If I could up vote you more than once, I surely would. After I installed a bit of software that wiped out my entire system path 2 days ago, I looked at my task bar a realized I had a cmd that had been open for about a week, and your "echo %PATH%" has not only saved my bacon, but saved me from several hours of painful path reconstruction for VIsual Studio, Dotnet, Office and many other large applications. EVERYBODY PLEASE VOTE THIS GUY UP!!!!
        – shawty
        Feb 28 '17 at 11:02














      • 3




        HOLY CRAP. I dont know why this didn't occur to me but you just saved me a humungous headache. TY.
        – dudewad
        Mar 20 '15 at 20:18






      • 2




        The "Ahah!" moment for me back when I posted this was quite rewarding.
        – Thomas G. Mayfield
        Mar 20 '15 at 22:07






      • 2




        Oh, you from the past. Thank you so much for unscrewing my total screw up. I was lost but because of you I saw the light and found the path again.
        – Sage Pourpre
        Nov 28 '15 at 4:17






      • 7




        Excellent answer. Saved me from restoring a backup. May I share a potentially not-so-obvious trick of how to open a command window if you don't have one open. If you have a program that has an open dialog (I used Chrome since it was open before I lost the path), hit Ctrl-O to open a website. Navigate to C:Windowssystem32 and find cmd.exe. Right-click on cmd.exe and click Open. This will bring up a command prompt with the environment variables of the software (chrome in this instance) and you can echo %path% to get your old env variables!
        – triadiktyo
        Oct 3 '16 at 14:28








      • 2




        YOU SIR ARE A GENIUS, If I could up vote you more than once, I surely would. After I installed a bit of software that wiped out my entire system path 2 days ago, I looked at my task bar a realized I had a cmd that had been open for about a week, and your "echo %PATH%" has not only saved my bacon, but saved me from several hours of painful path reconstruction for VIsual Studio, Dotnet, Office and many other large applications. EVERYBODY PLEASE VOTE THIS GUY UP!!!!
        – shawty
        Feb 28 '17 at 11:02








      3




      3




      HOLY CRAP. I dont know why this didn't occur to me but you just saved me a humungous headache. TY.
      – dudewad
      Mar 20 '15 at 20:18




      HOLY CRAP. I dont know why this didn't occur to me but you just saved me a humungous headache. TY.
      – dudewad
      Mar 20 '15 at 20:18




      2




      2




      The "Ahah!" moment for me back when I posted this was quite rewarding.
      – Thomas G. Mayfield
      Mar 20 '15 at 22:07




      The "Ahah!" moment for me back when I posted this was quite rewarding.
      – Thomas G. Mayfield
      Mar 20 '15 at 22:07




      2




      2




      Oh, you from the past. Thank you so much for unscrewing my total screw up. I was lost but because of you I saw the light and found the path again.
      – Sage Pourpre
      Nov 28 '15 at 4:17




      Oh, you from the past. Thank you so much for unscrewing my total screw up. I was lost but because of you I saw the light and found the path again.
      – Sage Pourpre
      Nov 28 '15 at 4:17




      7




      7




      Excellent answer. Saved me from restoring a backup. May I share a potentially not-so-obvious trick of how to open a command window if you don't have one open. If you have a program that has an open dialog (I used Chrome since it was open before I lost the path), hit Ctrl-O to open a website. Navigate to C:Windowssystem32 and find cmd.exe. Right-click on cmd.exe and click Open. This will bring up a command prompt with the environment variables of the software (chrome in this instance) and you can echo %path% to get your old env variables!
      – triadiktyo
      Oct 3 '16 at 14:28






      Excellent answer. Saved me from restoring a backup. May I share a potentially not-so-obvious trick of how to open a command window if you don't have one open. If you have a program that has an open dialog (I used Chrome since it was open before I lost the path), hit Ctrl-O to open a website. Navigate to C:Windowssystem32 and find cmd.exe. Right-click on cmd.exe and click Open. This will bring up a command prompt with the environment variables of the software (chrome in this instance) and you can echo %path% to get your old env variables!
      – triadiktyo
      Oct 3 '16 at 14:28






      2




      2




      YOU SIR ARE A GENIUS, If I could up vote you more than once, I surely would. After I installed a bit of software that wiped out my entire system path 2 days ago, I looked at my task bar a realized I had a cmd that had been open for about a week, and your "echo %PATH%" has not only saved my bacon, but saved me from several hours of painful path reconstruction for VIsual Studio, Dotnet, Office and many other large applications. EVERYBODY PLEASE VOTE THIS GUY UP!!!!
      – shawty
      Feb 28 '17 at 11:02




      YOU SIR ARE A GENIUS, If I could up vote you more than once, I surely would. After I installed a bit of software that wiped out my entire system path 2 days ago, I looked at my task bar a realized I had a cmd that had been open for about a week, and your "echo %PATH%" has not only saved my bacon, but saved me from several hours of painful path reconstruction for VIsual Studio, Dotnet, Office and many other large applications. EVERYBODY PLEASE VOTE THIS GUY UP!!!!
      – shawty
      Feb 28 '17 at 11:02













      21














      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)



      Example of previous versions of RegBack



      and examined the earliest ControlSet within the HKEY_LOCAL_MACHINE/System node of that copy of the registry file, ControlSet002:



      enter image description here



      and copied out the previous value of my path variable from the key ControlSession ManagerEnvironmentPath within that level.



      enter image description here



      Your mileage may vary, as I don't know exactly what triggers the backup of the registry.






      share|improve this answer



















      • 1




        Even easier, a note from the old question "Note that for System, depending on how long ago this was, you can just go back into HKLM(old control set version)ControlSession ManagerEnvironment without loading an old hive"
        – Jahmic
        Mar 12 '14 at 6:38










      • What is MOLD? When i go to the previous versions of Regback, I see one previous folder, and despite the depth of the linked answer, I still don't know what to do. Also, how did you manage to open the HKEY_LOCAL_MACHINE/System node of any Regback folder?
        – Ungeheuer
        Oct 18 '16 at 2:50












      • Where are those backups stored?
        – Shimmy
        Nov 3 '17 at 1:28
















      21














      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)



      Example of previous versions of RegBack



      and examined the earliest ControlSet within the HKEY_LOCAL_MACHINE/System node of that copy of the registry file, ControlSet002:



      enter image description here



      and copied out the previous value of my path variable from the key ControlSession ManagerEnvironmentPath within that level.



      enter image description here



      Your mileage may vary, as I don't know exactly what triggers the backup of the registry.






      share|improve this answer



















      • 1




        Even easier, a note from the old question "Note that for System, depending on how long ago this was, you can just go back into HKLM(old control set version)ControlSession ManagerEnvironment without loading an old hive"
        – Jahmic
        Mar 12 '14 at 6:38










      • What is MOLD? When i go to the previous versions of Regback, I see one previous folder, and despite the depth of the linked answer, I still don't know what to do. Also, how did you manage to open the HKEY_LOCAL_MACHINE/System node of any Regback folder?
        – Ungeheuer
        Oct 18 '16 at 2:50












      • Where are those backups stored?
        – Shimmy
        Nov 3 '17 at 1:28














      21












      21








      21






      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)



      Example of previous versions of RegBack



      and examined the earliest ControlSet within the HKEY_LOCAL_MACHINE/System node of that copy of the registry file, ControlSet002:



      enter image description here



      and copied out the previous value of my path variable from the key ControlSession ManagerEnvironmentPath within that level.



      enter image description here



      Your mileage may vary, as I don't know exactly what triggers the backup of the registry.






      share|improve this answer














      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)



      Example of previous versions of RegBack



      and examined the earliest ControlSet within the HKEY_LOCAL_MACHINE/System node of that copy of the registry file, ControlSet002:



      enter image description here



      and copied out the previous value of my path variable from the key ControlSession ManagerEnvironmentPath within that level.



      enter image description here



      Your mileage may vary, as I don't know exactly what triggers the backup of the registry.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Mar 20 '17 at 10:17









      Community

      1




      1










      answered Mar 25 '13 at 19:14









      marfarma

      3441314




      3441314








      • 1




        Even easier, a note from the old question "Note that for System, depending on how long ago this was, you can just go back into HKLM(old control set version)ControlSession ManagerEnvironment without loading an old hive"
        – Jahmic
        Mar 12 '14 at 6:38










      • What is MOLD? When i go to the previous versions of Regback, I see one previous folder, and despite the depth of the linked answer, I still don't know what to do. Also, how did you manage to open the HKEY_LOCAL_MACHINE/System node of any Regback folder?
        – Ungeheuer
        Oct 18 '16 at 2:50












      • Where are those backups stored?
        – Shimmy
        Nov 3 '17 at 1:28














      • 1




        Even easier, a note from the old question "Note that for System, depending on how long ago this was, you can just go back into HKLM(old control set version)ControlSession ManagerEnvironment without loading an old hive"
        – Jahmic
        Mar 12 '14 at 6:38










      • What is MOLD? When i go to the previous versions of Regback, I see one previous folder, and despite the depth of the linked answer, I still don't know what to do. Also, how did you manage to open the HKEY_LOCAL_MACHINE/System node of any Regback folder?
        – Ungeheuer
        Oct 18 '16 at 2:50












      • Where are those backups stored?
        – Shimmy
        Nov 3 '17 at 1:28








      1




      1




      Even easier, a note from the old question "Note that for System, depending on how long ago this was, you can just go back into HKLM(old control set version)ControlSession ManagerEnvironment without loading an old hive"
      – Jahmic
      Mar 12 '14 at 6:38




      Even easier, a note from the old question "Note that for System, depending on how long ago this was, you can just go back into HKLM(old control set version)ControlSession ManagerEnvironment without loading an old hive"
      – Jahmic
      Mar 12 '14 at 6:38












      What is MOLD? When i go to the previous versions of Regback, I see one previous folder, and despite the depth of the linked answer, I still don't know what to do. Also, how did you manage to open the HKEY_LOCAL_MACHINE/System node of any Regback folder?
      – Ungeheuer
      Oct 18 '16 at 2:50






      What is MOLD? When i go to the previous versions of Regback, I see one previous folder, and despite the depth of the linked answer, I still don't know what to do. Also, how did you manage to open the HKEY_LOCAL_MACHINE/System node of any Regback folder?
      – Ungeheuer
      Oct 18 '16 at 2:50














      Where are those backups stored?
      – Shimmy
      Nov 3 '17 at 1:28




      Where are those backups stored?
      – Shimmy
      Nov 3 '17 at 1:28











      7














      You could do a system restore.




      To restore your PC using System Restore



      Swipe in from the right edge of the screen, and then tap Search.
      (If you're using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, and then click Search.) Enter
      Recovery in the search box, tap or click Settings, and then tap or
      click Recovery.



      Tap or click Open System Restore, and follow the prompts.







      share|improve this answer


























        7














        You could do a system restore.




        To restore your PC using System Restore



        Swipe in from the right edge of the screen, and then tap Search.
        (If you're using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, and then click Search.) Enter
        Recovery in the search box, tap or click Settings, and then tap or
        click Recovery.



        Tap or click Open System Restore, and follow the prompts.







        share|improve this answer
























          7












          7








          7






          You could do a system restore.




          To restore your PC using System Restore



          Swipe in from the right edge of the screen, and then tap Search.
          (If you're using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, and then click Search.) Enter
          Recovery in the search box, tap or click Settings, and then tap or
          click Recovery.



          Tap or click Open System Restore, and follow the prompts.







          share|improve this answer












          You could do a system restore.




          To restore your PC using System Restore



          Swipe in from the right edge of the screen, and then tap Search.
          (If you're using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, and then click Search.) Enter
          Recovery in the search box, tap or click Settings, and then tap or
          click Recovery.



          Tap or click Open System Restore, and follow the prompts.








          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 24 '12 at 11:46









          Dave

          23.2k74362




          23.2k74362























              2















              • From the start menu, open Run (or press ⊞ Win+R).

              • Type regedit


                • Find HKEY_LOCAL_MACHINE folder

                • Go to the SYSTEM folder

                • Go to the ControlSet002 folder

                • Go to Control folder

                • Go to Session Manager

                • Go to Environment folder

                • Then, inside Environment folder, double click Path




              The previous Path should be there.






              share|improve this answer



















              • 1




                This should be the accepted answer. The one chosen works for short variables and doesn't allow for copy and paste. Here you can do it as needed.
                – javydreamercsw
                Jun 20 '17 at 19:56






              • 1




                It shows the current path. Not the old one.
                – Shimmy
                Nov 3 '17 at 1:26










              • it doesnt show me the path at all :(
                – Ayyash
                Oct 26 at 10:36
















              2















              • From the start menu, open Run (or press ⊞ Win+R).

              • Type regedit


                • Find HKEY_LOCAL_MACHINE folder

                • Go to the SYSTEM folder

                • Go to the ControlSet002 folder

                • Go to Control folder

                • Go to Session Manager

                • Go to Environment folder

                • Then, inside Environment folder, double click Path




              The previous Path should be there.






              share|improve this answer



















              • 1




                This should be the accepted answer. The one chosen works for short variables and doesn't allow for copy and paste. Here you can do it as needed.
                – javydreamercsw
                Jun 20 '17 at 19:56






              • 1




                It shows the current path. Not the old one.
                – Shimmy
                Nov 3 '17 at 1:26










              • it doesnt show me the path at all :(
                – Ayyash
                Oct 26 at 10:36














              2












              2








              2







              • From the start menu, open Run (or press ⊞ Win+R).

              • Type regedit


                • Find HKEY_LOCAL_MACHINE folder

                • Go to the SYSTEM folder

                • Go to the ControlSet002 folder

                • Go to Control folder

                • Go to Session Manager

                • Go to Environment folder

                • Then, inside Environment folder, double click Path




              The previous Path should be there.






              share|improve this answer















              • From the start menu, open Run (or press ⊞ Win+R).

              • Type regedit


                • Find HKEY_LOCAL_MACHINE folder

                • Go to the SYSTEM folder

                • Go to the ControlSet002 folder

                • Go to Control folder

                • Go to Session Manager

                • Go to Environment folder

                • Then, inside Environment folder, double click Path




              The previous Path should be there.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Nov 3 '17 at 2:11









              Shimmy

              1,195112654




              1,195112654










              answered May 31 '17 at 7:30









              Joramie Mier

              211




              211








              • 1




                This should be the accepted answer. The one chosen works for short variables and doesn't allow for copy and paste. Here you can do it as needed.
                – javydreamercsw
                Jun 20 '17 at 19:56






              • 1




                It shows the current path. Not the old one.
                – Shimmy
                Nov 3 '17 at 1:26










              • it doesnt show me the path at all :(
                – Ayyash
                Oct 26 at 10:36














              • 1




                This should be the accepted answer. The one chosen works for short variables and doesn't allow for copy and paste. Here you can do it as needed.
                – javydreamercsw
                Jun 20 '17 at 19:56






              • 1




                It shows the current path. Not the old one.
                – Shimmy
                Nov 3 '17 at 1:26










              • it doesnt show me the path at all :(
                – Ayyash
                Oct 26 at 10:36








              1




              1




              This should be the accepted answer. The one chosen works for short variables and doesn't allow for copy and paste. Here you can do it as needed.
              – javydreamercsw
              Jun 20 '17 at 19:56




              This should be the accepted answer. The one chosen works for short variables and doesn't allow for copy and paste. Here you can do it as needed.
              – javydreamercsw
              Jun 20 '17 at 19:56




              1




              1




              It shows the current path. Not the old one.
              – Shimmy
              Nov 3 '17 at 1:26




              It shows the current path. Not the old one.
              – Shimmy
              Nov 3 '17 at 1:26












              it doesnt show me the path at all :(
              – Ayyash
              Oct 26 at 10:36




              it doesnt show me the path at all :(
              – Ayyash
              Oct 26 at 10:36











              0














              Another way to restore the default PATH, for both current user and machine user, is to use an useful application that I developed in .Net platform, with name PATHS.



              Usage would be:



              PATHS.exe /Restore


              It is a freeware tool to add, delete, clean or restore the PATH and PATHEXT, it can be downloaded here, including source-code:



              http://www.mediafire.com/download/ffuxgwezf4jd5c0/PATHS.rar



              enter image description here



              enter image description here






              share|improve this answer

















              • 2




                Do you have a website with a more reliable download/updates? Can you confirm this is the latest version? Are there known bugs?
                – beppe9000
                Jul 31 '16 at 17:54






              • 3




                The title makes me want to play old nineties games.
                – xdhmoore
                Oct 20 '16 at 2:10






              • 1




                Is it open source?
                – Shimmy
                Nov 3 '17 at 1:26
















              0














              Another way to restore the default PATH, for both current user and machine user, is to use an useful application that I developed in .Net platform, with name PATHS.



              Usage would be:



              PATHS.exe /Restore


              It is a freeware tool to add, delete, clean or restore the PATH and PATHEXT, it can be downloaded here, including source-code:



              http://www.mediafire.com/download/ffuxgwezf4jd5c0/PATHS.rar



              enter image description here



              enter image description here






              share|improve this answer

















              • 2




                Do you have a website with a more reliable download/updates? Can you confirm this is the latest version? Are there known bugs?
                – beppe9000
                Jul 31 '16 at 17:54






              • 3




                The title makes me want to play old nineties games.
                – xdhmoore
                Oct 20 '16 at 2:10






              • 1




                Is it open source?
                – Shimmy
                Nov 3 '17 at 1:26














              0












              0








              0






              Another way to restore the default PATH, for both current user and machine user, is to use an useful application that I developed in .Net platform, with name PATHS.



              Usage would be:



              PATHS.exe /Restore


              It is a freeware tool to add, delete, clean or restore the PATH and PATHEXT, it can be downloaded here, including source-code:



              http://www.mediafire.com/download/ffuxgwezf4jd5c0/PATHS.rar



              enter image description here



              enter image description here






              share|improve this answer












              Another way to restore the default PATH, for both current user and machine user, is to use an useful application that I developed in .Net platform, with name PATHS.



              Usage would be:



              PATHS.exe /Restore


              It is a freeware tool to add, delete, clean or restore the PATH and PATHEXT, it can be downloaded here, including source-code:



              http://www.mediafire.com/download/ffuxgwezf4jd5c0/PATHS.rar



              enter image description here



              enter image description here







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Nov 5 '15 at 15:12









              ElektroStudios

              69351444




              69351444








              • 2




                Do you have a website with a more reliable download/updates? Can you confirm this is the latest version? Are there known bugs?
                – beppe9000
                Jul 31 '16 at 17:54






              • 3




                The title makes me want to play old nineties games.
                – xdhmoore
                Oct 20 '16 at 2:10






              • 1




                Is it open source?
                – Shimmy
                Nov 3 '17 at 1:26














              • 2




                Do you have a website with a more reliable download/updates? Can you confirm this is the latest version? Are there known bugs?
                – beppe9000
                Jul 31 '16 at 17:54






              • 3




                The title makes me want to play old nineties games.
                – xdhmoore
                Oct 20 '16 at 2:10






              • 1




                Is it open source?
                – Shimmy
                Nov 3 '17 at 1:26








              2




              2




              Do you have a website with a more reliable download/updates? Can you confirm this is the latest version? Are there known bugs?
              – beppe9000
              Jul 31 '16 at 17:54




              Do you have a website with a more reliable download/updates? Can you confirm this is the latest version? Are there known bugs?
              – beppe9000
              Jul 31 '16 at 17:54




              3




              3




              The title makes me want to play old nineties games.
              – xdhmoore
              Oct 20 '16 at 2:10




              The title makes me want to play old nineties games.
              – xdhmoore
              Oct 20 '16 at 2:10




              1




              1




              Is it open source?
              – Shimmy
              Nov 3 '17 at 1:26




              Is it open source?
              – Shimmy
              Nov 3 '17 at 1:26











              0














              I only discovered the problem with the environment variables days after they got ruined by the installation of an outdated app. But I still had a full registry backup. There one can find all the system environment variables as off the date of the backup. These can then be compared with the current situation as per System / Advanced system settings / Environment variables. Depending upon how recent the backup is, and assuming no environment variable changes since then, you are ok. Worst case is that you'll have to reinstall the apps that you had installed after the registry backup and before losing your path data, which is typically less work than a restore. Below I'll explain how this can be done.




              1. Open the backup.reg file with Notepad++ (free and excellent editor). Find HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Control/Session Manager/Environment. If that does not work try ControlSet002 or higher.


              2. Copy paste the hex(2) hash data for the PATH into a new Notepad++ window. Find/replace all ',' (commas w/o the quotes) with ' ' and all '00' with '', and all double spaces ' ' with a single space ' '. You should now be left with "pure hex" without commas or zeros as separator.


              3. Open http://www.rapidtables.com/convert/number/hex-to-ascii.htm . This is a hex to ascii converter. Copy paste the "pure hex" data into the hex window and click convert. You can now see your path data, and copy paste them into Notepad, compare with the current version, and add the missing data. You're back in business!


              4. As a bonus you might also want to check on the other environment variables by comparing the data in the Notepad++ backup.reg with the current values. Missing data can be retrieved in the same way as explained above.







              share|improve this answer


























                0














                I only discovered the problem with the environment variables days after they got ruined by the installation of an outdated app. But I still had a full registry backup. There one can find all the system environment variables as off the date of the backup. These can then be compared with the current situation as per System / Advanced system settings / Environment variables. Depending upon how recent the backup is, and assuming no environment variable changes since then, you are ok. Worst case is that you'll have to reinstall the apps that you had installed after the registry backup and before losing your path data, which is typically less work than a restore. Below I'll explain how this can be done.




                1. Open the backup.reg file with Notepad++ (free and excellent editor). Find HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Control/Session Manager/Environment. If that does not work try ControlSet002 or higher.


                2. Copy paste the hex(2) hash data for the PATH into a new Notepad++ window. Find/replace all ',' (commas w/o the quotes) with ' ' and all '00' with '', and all double spaces ' ' with a single space ' '. You should now be left with "pure hex" without commas or zeros as separator.


                3. Open http://www.rapidtables.com/convert/number/hex-to-ascii.htm . This is a hex to ascii converter. Copy paste the "pure hex" data into the hex window and click convert. You can now see your path data, and copy paste them into Notepad, compare with the current version, and add the missing data. You're back in business!


                4. As a bonus you might also want to check on the other environment variables by comparing the data in the Notepad++ backup.reg with the current values. Missing data can be retrieved in the same way as explained above.







                share|improve this answer
























                  0












                  0








                  0






                  I only discovered the problem with the environment variables days after they got ruined by the installation of an outdated app. But I still had a full registry backup. There one can find all the system environment variables as off the date of the backup. These can then be compared with the current situation as per System / Advanced system settings / Environment variables. Depending upon how recent the backup is, and assuming no environment variable changes since then, you are ok. Worst case is that you'll have to reinstall the apps that you had installed after the registry backup and before losing your path data, which is typically less work than a restore. Below I'll explain how this can be done.




                  1. Open the backup.reg file with Notepad++ (free and excellent editor). Find HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Control/Session Manager/Environment. If that does not work try ControlSet002 or higher.


                  2. Copy paste the hex(2) hash data for the PATH into a new Notepad++ window. Find/replace all ',' (commas w/o the quotes) with ' ' and all '00' with '', and all double spaces ' ' with a single space ' '. You should now be left with "pure hex" without commas or zeros as separator.


                  3. Open http://www.rapidtables.com/convert/number/hex-to-ascii.htm . This is a hex to ascii converter. Copy paste the "pure hex" data into the hex window and click convert. You can now see your path data, and copy paste them into Notepad, compare with the current version, and add the missing data. You're back in business!


                  4. As a bonus you might also want to check on the other environment variables by comparing the data in the Notepad++ backup.reg with the current values. Missing data can be retrieved in the same way as explained above.







                  share|improve this answer












                  I only discovered the problem with the environment variables days after they got ruined by the installation of an outdated app. But I still had a full registry backup. There one can find all the system environment variables as off the date of the backup. These can then be compared with the current situation as per System / Advanced system settings / Environment variables. Depending upon how recent the backup is, and assuming no environment variable changes since then, you are ok. Worst case is that you'll have to reinstall the apps that you had installed after the registry backup and before losing your path data, which is typically less work than a restore. Below I'll explain how this can be done.




                  1. Open the backup.reg file with Notepad++ (free and excellent editor). Find HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Control/Session Manager/Environment. If that does not work try ControlSet002 or higher.


                  2. Copy paste the hex(2) hash data for the PATH into a new Notepad++ window. Find/replace all ',' (commas w/o the quotes) with ' ' and all '00' with '', and all double spaces ' ' with a single space ' '. You should now be left with "pure hex" without commas or zeros as separator.


                  3. Open http://www.rapidtables.com/convert/number/hex-to-ascii.htm . This is a hex to ascii converter. Copy paste the "pure hex" data into the hex window and click convert. You can now see your path data, and copy paste them into Notepad, compare with the current version, and add the missing data. You're back in business!


                  4. As a bonus you might also want to check on the other environment variables by comparing the data in the Notepad++ backup.reg with the current values. Missing data can be retrieved in the same way as explained above.








                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 16 '17 at 10:43









                  marcopolo

                  1




                  1























                      -1














                      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!






                      share|improve this answer





















                      • This duplicates information already present in another answer, and pre-supposes that one happens to have a command prompt already open in this situation.
                        – bertieb
                        Sep 5 '15 at 15:38
















                      -1














                      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!






                      share|improve this answer





















                      • This duplicates information already present in another answer, and pre-supposes that one happens to have a command prompt already open in this situation.
                        – bertieb
                        Sep 5 '15 at 15:38














                      -1












                      -1








                      -1






                      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!






                      share|improve this answer












                      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!







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Sep 5 '15 at 11:43









                      JosieDoherty

                      1




                      1












                      • This duplicates information already present in another answer, and pre-supposes that one happens to have a command prompt already open in this situation.
                        – bertieb
                        Sep 5 '15 at 15:38


















                      • This duplicates information already present in another answer, and pre-supposes that one happens to have a command prompt already open in this situation.
                        – bertieb
                        Sep 5 '15 at 15:38
















                      This duplicates information already present in another answer, and pre-supposes that one happens to have a command prompt already open in this situation.
                      – bertieb
                      Sep 5 '15 at 15:38




                      This duplicates information already present in another answer, and pre-supposes that one happens to have a command prompt already open in this situation.
                      – bertieb
                      Sep 5 '15 at 15:38


















                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Super User!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f523688%2fdeleted-path-environment-variable-how-to-restore%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Aardman Animations

                      Are they similar matrix

                      “minimization” problem in Euclidean space related to orthonormal basis