Monday, March 11, 2019

windows 7 - Win7: messed up system - set too long path variable

I just messed up my Windows 7 Enterprise 64-bit.




I tried to install CMake - and during installation i got an error saying something like it can't set the path variable, because it is too long (I can't reproduce the exact error message as the installer won't start now anymore).



So - what I did then was to open control panel -> sytem and security -> system -> advanced system settings -> environment variables



and i added the cmake bin folder manually to the end of the PATH system variable and saved.



But well - now nothing works anymore. If i try to open 'Advanced system settings' again, i get the error



C:\Windows\system32\system32\systempropertiesadvanced.exe
The filename or extension is too long.



if I try to open regedit



C:\Windows\regedit.exe
The filename or extension is too long.


I still can open a cmd prompt, but not elevated. If i try to start cmd as administrator, i'll get the same error.




I don't want to restart my computer as i think it will not be able to boot up in the current state. I don't know how to change my Path variable back to what it was before



//edit:



I see now a bit better what i did wrong.



beside extending the path variable, i also set a new system Envrionment variable called



OPENCV_ROOT




but unfortunately i had the System Path in the clipboard when copy pasting it. so, what i have now is something like this:



OPENCV_ROOT = .....;%OPENCV_ROOT%\bin;....



PATH = .....;%OPENCV_ROOT%\bin;....



this is obviously very bad. I try to delete the OPENCV_ROOT variable, but without being able to start any elevated application, it seems impossible



Help?

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...