Jump to content

The system could not find the environment option that was entered

Recommended Posts

I recently ran into this error message (The system could not find the environment option that was entered) while trying to fix a friend’s computer and thought I’d share my fix. The computer was a slim laptop running Vista Home Premium that I think may have been the victim of some fake anti-malware program. While some things like the control panel would open, any attempts to open things such as system restore or administrative tools would generate the error message. Windows firewall and the anti-virus program were both disabled. It looked like someone had installed and run MalwareBytes Anti-Malware at some point although it would no longer update or scan.

Pressing F8 at startup showed no “Repair” option. Safe-mode would work but wouldn’t show any system restore points available. The laptop’s hidden partition restore option only offered to wipe everything back to factory new. I thought about booting from a Vista DVD to get the System Repair option but this laptop had no DVD drive and I didn’t have a USB drive available. Information on the internet suggested that the error message was the result of missing system environment variables. Opening a command prompt window and entering SET showed only a few variables available. Notably, there was no PATH or WINDIR variable.

To fix this, I started in safe-mode (RegEdit would only work in safe-mode) and inserted PATH and WINDIR under the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment (setting Windir = C:\Windows and Path = C:\Windows\System32;C:\Windows;C:Windows\System32\Wbem). After that, System Restore began working again on a normal startup and showed several months worth of restore points. Picking an early restore point returned most things to normal while a virus scan and SFC /SCANNOW finished things up. I hope this works for you.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...