Share this article

Improve this guide

Fix: The System Could not Find the Environment Option

A reset is the last resort

10 min. read

Updated onApril 11, 2024

updated onApril 11, 2024

Share this article

Improve this guide

Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more

Key notes

ERROR ENVVAR NOT FOUND usually comes followed byThe system could not find the environment option that was enteredmessage.

This is a system error, and it can occur on any Windows operating system, including Windows 10. Since thiserroris somewhat common, we will show you how to fix it properly.

What does The system could not find the environment option that was entered error mean?

What does The system could not find the environment option that was entered error mean?

The error messageThe system could not find the environment option that was enteredtypically indicates that a command or program is attempting to reference an environment variable that does not exist or cannot be found. This error message can have various causes, including:

It’s important to note that this error message can appear in various contexts, including when running programs or scripts, installing software, or modifying system settings. The specific cause of the error will depend on the context in which it appears.

How can I fix the system could not find the environment error?

How can I fix the system could not find the environment error?

1. Scan your PC for viruses

Another common cause for these types of problems is malware infection. Sometimes malware can change your system and cause this and many othererrorsto appear.

If you suspect your PC is infected by malware, we advise you to perform a full scan as soon as possible. But for that, you will need a powerful and reliable antivirus.

We recommend you get anantivirus with a high detection rate, run a full PC scan, and remove any threats found.

Reliable antiviruses have powerful firewalls, a good privacy policy, and multiple layers of protection to ensure your PC is fully secure.

Of course, using great antivirus also protects you online by blocking potentially dangerous websites.

One of the safest antivirus options we recommend is the ESET HOME Security Essential tool because it has high detection rates and robust multi-layered protection technology that removes any cyber threat.

ESET HOME Security Essential

2. Add the missing environment variable

Windows uses environment variables to access certainfiles faster.

These variables are related to system directories. If a certain variable is missing or not configured properly, you can getThe system could not find the environment option that was enterederror message.

This issue can appear if %WINDIR% variable is missing.

Performing this solution from Safe Mode is not mandatory, so you can try it without entering it.

This issue can occur due to other missing environment variables, so you should compare the list containing these options with another working PC to find out which are missing.

If you find any discrepancies, you canedit the environment variable list and add the missing onewith the help of this guide.

This solution is provided if you can’t access Advanced System Settings. Modifying theregistry can be potentially dangerous so we advise you to create a backup just in case.

If the windir value is present in yourregistry, another missing environment variable may be causing this issue. You must find the missing variable and add it manually to theregistry.

3. Install Visual C++ Redistributables

Manyapplicationsrequire Visual C++ Redistributable to run properly, and if this component is missing, you might encounterThe system could not find the environment option that was enteredmessage.

Users reported that thiserrorusually occurs when trying to start a specific game, and if that’s the case, you can find the necessaryfilesin the_CommonRedistvcredistdirectory.

This directory is located in the game’s installation folder, and you just have to run the setupfilesfromvcredistfolder to fix the issue.

Remember that many versions of Visual C++ Redistributables are available, so you might have to download some older versions as well, depending on theapplicationyou’re trying to run.

These components come in 32-bit and 64-bit versions, and if you’re using a 64-bit system you’ll need to install bothversions. After installing the necessary redistributables, the problem should be completely resolved.

4. Perform an SFC scan

5.Reinstall Unifi and Java

Several users reported this problem while trying to run Unifi. According to them, they fixed the problem by reinstalling Java and Unifi.

After doing that, the issue was completely resolved, and they could reaccess Unifi without problems.

If you’re having this issue with any otherapplication, we suggest you reinstall it and check if that solves the problem.

6. Modify your registry

Modifying theregistrycan lead to system instability; therefore, we strongly advise you to create a backup in case anything goes wrong.

Remember that the system could not find the environment option that was entered issue occurs while working on C# projects meaning that this solution won’t work for most standard users.

7. Copy msvcr71.dll to the Tomcat installation directory

This solution applies to developers that use Java and Tomcat. If you’re not a developer using Tomcat, you can skip this solution.

Several developers reported this issue with Tomcat, but you can fix it by copyingmsvcr71.dllfrom theJavabintoTomcatbindirectory on your PC. After doing that, you should be able to use Tomcat without issues.

8. Perform a System Restore

If, for some reason, System Restore doesn’t work, you can try to perform it fromSafe Mode. We showed you how to runWindows 10in Safe Mode insolution number 2, so be sure to check it for extra instructions.

If The system could not find the environment option that was entered problem doesn’t appear in Safe Mode, and your user profile is likely corrupted, but you can fix the problem by creating a new profile.

9. Create a new user profile

After creating a new user account, check if the problem reappears. If not, you’ll have to move yourfilesto the new account and use it as your main account.

If the problem is still there, you might have toreset Windows 10. Read on to learn how you can do that.

10. ResetWindows 10

This process will remove allfilesfrom your primary partition, so we advise you to back them up. This procedure can sometimes requireWindows 10 installation media, so create one using the Media Creation Tool.

After the process is completed, you’ll have a fresh installation ofWindows 10, and all problems with thiserrorwill be resolved. Now, you have to restore all yourfilesand install applications.

This is a drastic solution, and we suggest performing it only if all other solutions can’t fix the problem.

ERROR_ENVVAR_NOT_FOUND andThe system could not find the environment option that was enteredmessages can cause many problems on your PC, but in most cases, you can fix these by checking environment variables.

If the issue persists, try any other solution from this article. For any additions or suggestions, use the comments section below.

More about the topics:System Errors

Milan Stanojevic

Windows Toubleshooting Expert

Milan has been enthusiastic about technology ever since his childhood days, and this led him to take interest in all PC-related technologies. He’s a PC enthusiast and he spends most of his time learning about computers and technology.

Before joining WindowsReport, he worked as a front-end web developer. Now, he’s one of the Troubleshooting experts in our worldwide team, specializing in Windows errors & software issues.

User forum

0 messages

Sort by:LatestOldestMost Votes

Comment*

Name*

Email*

Commenting as.Not you?

Save information for future comments

Comment

Δ

Milan Stanojevic

Windows Toubleshooting Expert

Before joining WindowsReport, he worked as a front-end web developer. Now, he’s specialized in Windows errors & software issues.