environment-variableswindows-10

How to recover deleted environment variables?


In a lazy attempt to debug Visual Studio Community, I (as per recommendation from another forum) deleted all of the system's environment variables. I realized doing this was a HUGE mistake! Nothing works in the right-click menu on the start button (I have Windows 10). Can't do anything in the Settings app, can't even create new accounts or reset computer. Can't open any application that requires administrator approval, either.

Anybody know how I can restore these variables? Just the ones necessary for the OS to work, I don't care if my applications created special ones, I can un/reinstall later. As I type I get an error message after attempting to reset computer saying "The system could not find the environment option that was entered," basically confirming this is the issue.

Thank you!

Hardware: AMD A10-6700 APU with Radeon(tm) HD Graphics 3.70 GHz 12.0 GB RAM 64-bit


Solution

    1. In Windows 10 navigate to Start > Settings > Update & Security > Recovery
    2. Under Advanced Startup, click Restart Now
    3. Once the computer reboots into Advanced Startup, click Troubleshoot
    4. Click Refresh Your PC

    Windows 10 restores, keeps all files and apps but removes drivers and custom settings.