The system could not find the environment option that was entered

By: Milan Stanojevic
9 minute read
The system could not find the environment option that was entered

For various PC problems, we recommend this tool.

This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues now in 3 easy steps:

  1. Download this PC Repair Tool rated "Excellent" on TrustPilot.com.
  2. Click “Start Scan” to find Windows issues that could be causing PC problems.
  3. Click “Repair All” to fix all issues with Patended Technologies (requires upgrade).

ERROR_ENVVAR_NOT_FOUND error usually comes followed by The system could not find the environment option that was entered message. This is a system error, and it can occur on any Windows operating system, including Windows 10. Since this error is somewhat common, today we’re going to show you how to properly fix it.

The system could not find the environment option that was entered [FIX]

Fix – ERROR_ENVVAR_NOT_FOUND

Solution 1 – Add the missing environment variable

In order to access certain files faster, Windows uses environment variables. These variables are related to system directories, and if certain variable is missing or not configured properly you can get The system could not find the environment option that was entered error message. This issue can appear if %WINDIR% variable is missing, but you can fix this problem by following these steps:

  1. Open Start Menu, click the Power button, press and hold the Shift key on the keyboard and click on Restart.
  2. You’ll see three options available. Click on Troubleshoot > Advanced options > Startup Settings and click the Restart button.
  3. After your computer restarts, you’ll see a list of options. Press the appropriate key to enter Safe Mode.
  4. Once you enter Safe Mode, press Windows Key + S and enter advanced system settings. Choose View advanced system settings from the menu.
  5. System Properties window will now appear. Click on Environment Variables button.
  6. Go to System variables section and click on New.
  7. Enter windir as Variable name and C:Windows as Variable value. Click OK to save changes.
  8. After saving your changes, restart your PC and check if the problem is resolved.

Keep in mind that it’s not mandatory to perform this solution from Safe Mode so you’re free to try it without entering it. This issue can occur due to other missing environment variables, so to find out which variable is missing we advise you to check the list of environment variables on a working PC and compare it to yours.

Several users reported that missing ComSpec or Path variable can cause this problem to occur. If that’s the case, you need to repeat the steps above and create ComSpec variable with %SystemRoot%system32cmd.exe value. As for Path variable, its value should be %SystemRoot%system32;%SystemRoot%;%SystemRoot%Sy stem32Wbem;%SYSTEMROOT%System32WindowsPowerShel lv1.0.

Few users reported that they can’t access Advanced System Settings for some reason, and if that’s the case you can create the missing environment variables by using Registry Editor. Modifying the registry can be potentially dangerous so we advise you to create a backup just in case. To edit your registry, do the following:

  1. Press Windows Key + R and enter regedit. Press Enter or click OK.
  2. In the left pane, navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerEnvironment.
  3. In the right pane windir value should be missing. If that’s the case, you need to recreate it. To do that, right click the empty space in the right pane and choose New > String Value. Enter windir as the name of the new string.
  4. Double click newly created windir string to open its properties. Enter C:Windows as Value data and click OK to save changes.
  5. Close Registry Editor and restart your PC to apply the changes.

If windir value is present in your registry, it’s possible that other missing environment variable is causing this issue. To fix the problem, you need to find the missing variable and add it manually to the registry.

Solution 2 – Install Visual C++ Redistributables

Many applications require Visual C++ Redistributable in order to run properly, and if this component is missing you might encounter The system could not find the environment option that was entered message. Users reported that this error usually occurs when trying to start a specific game, and if that’s the case, you can find the necessary files in _CommonRedistvcredist directory. This directory is located in the game’s installation directory, and you just have to run the setup files from vcredist folder to fix the issue.

In case you’re trying to start an application, you might have to download Visual C++ Redistributables manually. All necessary files are available from Microsoft’s website and you can download them for free. Keep in mind that there are many versions of Visual C++ Redistributables available, so you might have to download some older versions as well depending on the application you’re trying to run. These components come in both 32-bit and 64-bit version, and if you’re using 64-bit system you’ll need to install both 32-bit and 64-bit version. After installing the necessary redistributables, the problem should be completely resolved.

Solution 3 – Scan your PC for viruses

Another common cause for these types of problems is malware infection. Sometimes malware can make changes to your system and cause this and many other errors to appear. If you suspect your PC is infected by malware, we advise you to perform a full scan as soon as you can. In addition to using your currently installed antivirus, you might want to use additional anti-malware software as well. If your PC is malware-free, you should proceed to the next solution.

Solution 4 – Perform an SFC scan

If you’re getting The system could not find the environment option that was entered message frequently, the cause might be corrupted system files. System files can easily become corrupted due to various factors, but you can easily fix the corrupted files by performing an SFC scan. To do that, follow these simple steps:

  1. Press Windows Key + X to open Win + X menu and choose Command Prompt (Admin) from the list.
  2. When Command Prompt opens, enter sfc /scannow and press Enter to run it.
  3. Windows will now scan your system and check for corrupted files. This process can take a while, so try not to interrupt it.

After SFC scan is finished, check if the problem still persists.

Solution 5 – Reinstall Unifi and Java

Several users reported this problem while trying to run Unifi. According to them, they managed to fix the problem by reinstalling Java and Unifi. After doing that, the issue was completely resolved and they were to access Unifi again without problems. If you’re having this issue with any other application, we suggest you reinstall it and check if that solves the problem. In addition, you might want to try reinstalling Java as well.

Solution 6 – Modify your registry


For various PC problems, we recommend this tool.

This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues now in 3 easy steps:

  1. Download this PC Repair Tool rated "Excellent" on TrustPilot.com.
  2. Click “Start Scan” to find Windows issues that could be causing PC problems.
  3. Click “Repair All” to fix all issues with Patended Technologies (requires upgrade).

Several users reported that this issue occurs while working on C# projects, and in order to fix it you need to make few changes to your registry. Modifying the registry can lead to system instability, therefore we strongly advise you to create a backup in case anything goes wrong. To fix this problem, do the following:

  1. Start Registry Editor. For detailed instructions on how to start Registry Editor check Solution 1.
  2. Once you start Registry Editor in the left pane navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLanmanServerParameters key in the left pane. In the right pane, right click the empty space and choose New > DWORD (32-bit) Value.
  3. Enter IRPStackSize as the name of the new DWORD and double click it to open its properties. In Data Value field enter the value that is appropriate for your network and click OK. As for the values, the supported values are from 11 to 50.

After performing the changes, check if the problem is resolved. Keep in mind that this issues occurs while working on C# projects meaning that this solution won’t work for most standard users.

Solution 7 – Copy msvcr71.dll to Tomcat installation directory

This solution applies to developers that use Java and Tomcat. If you’re not a developer and you’re not using Tomcat, you can skip this solution. Several developers reported this issue with Tomcat, but you can fix it by copying msvcr71.dll from the Javabin to Tomcatbin directory on your PC. After doing that, you should be able to use Tomcat without any issues.

Solution 8 – Perform a System Restore

If you’re still getting The system could not find the environment option that was entered message, you might be able to fix the problem by performing System Restore. Using this feature you can easily restore your PC to earlier state and fix all recent problems. This feature automatically creates restore points once a week as well as after installing certain software. To restore your system to an earlier state, follow these steps:

  1. Press Windows Key + S and enter system restore. Choose Create a restore point option from the menu.
  2. System Properties window will appear. Click on System Restore button.
  3. Wait for System Restore to start. Once it starts, select Choose a different restore point option and click Next.
  4. Check Show more restore points option in the bottom right corner, choose the desired restore point and click on Next.
  5. Follow the instructions on the screen in order to complete the restore process.

If for some reason System Restore doesn’t work, you can try to perform it from Safe Mode. We showed you how to run Windows 10 in Safe Mode in Solution 1, so be sure to check it for extra instructions.

Solution 9 – Create a new user profile

Sometimes The system could not find the environment option that was entered message can appear if your profile is corrupted, so you’ll need to create a new one. If this problem doesn’t appear in Safe Mode, it’s likely that your user profile is corrupted, but you can fix the problem by creating a new profile. This is rather simple, and you can do it by following these steps:

  1. Press Windows Key + I to open the Settings app.
  2. Go to Accounts section > Family & other people and click on Add someone else to this PC.
  3. Now click on I don’t have this person’s sign-in information.
  4. Select Add a user without a Microsoft account.
  5. Enter the user name for the new user and click on Next.

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

Solution 10 – Reset Windows 10

If previous solution didn’t work for you, you might have to reset Windows 10. This process will remove all files from your primary partition, so we advise you to back them up. In some cases this procedure can require Windows 10 installation media, so be sure to create one using Media Creation Tool. After backing up your files, you can reset Windows 10 by following these steps:

  1. Open Start Menu, click the Power button, press and hold the Shift key on your keyboard and click the Restart option.
  2. List of options will appear, click on Troubleshoot > Reset this PC.
  3. Now you can choose between two options: Keep my files or Remove everything. Both options will remove all installed applications and drivers, but the first option can preserve your personal files. If you already have a back up of your personal files feel free to choose Remove everything option.
  4. Now you might get asked to insert Windows 10 installation media. If so, be sure to insert it.
  5. Choose your version of Windows and select Only the drive where Windows is installed. By selecting this option your system drive and all files on it will be removed.
  6. Now choose Just remove my files option.
  7. You’ll see a list of changes that resetting will make. Be sure that all your important files are backed up and click the Reset button.
  8. Reset process will now start. It might take a while so you need to wait while it finishes.

After the process is completed, you’ll have a fresh installation of Windows 10, and all problems with this error will be resolved. Now you just have to restore all your files and installed applications. This is a drastic solution and we suggest to perform it only if all other solutions can’t fix the problem.

ERROR_ENVVAR_NOT_FOUND and The system could not find the environment option that was entered message can cause a lot of problems on your PC, but in most cases you can fix this message by checking environment variables. If the issue still persists, feel free to try any other solution from this article.

READ ALSO:

For various PC problems, we recommend this tool.

This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues now in 3 easy steps:

  1. Download this PC Repair Tool rated "Excellent" on TrustPilot.com.
  2. Click “Start Scan” to find Windows issues that could be causing PC problems.
  3. Click “Repair All” to fix all issues with Patended Technologies (requires upgrade).

Discussions

Next up

Best Windows 10 antivirus software to use in 2018

By: Radu Tyrsina
7 minute read

Update – 2018 will soon come to an end and we already have a guide on what is the best antivirus you should get in […]

Continue Reading

These features are out for good with Windows 10 version 1809

iamsovy@gmail.com' By: Sovan Mandal
2 minute read

Microsoft is all set to launch its next big update, Windows 10 version 1809 in October. While that should be a nice piece of news […]

Continue Reading

Windows 10 18H2 builds no longer receive new features

By: Matthew Adams
3 minute read

The Windows 10 October 2018 Update (otherwise 18H2) rollout might now be two to three weeks away. For the last few months, new build previews […]

Continue Reading