Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Within my 15 years of PC experience I have never seen something like this.

My Path variable within the Environment Variables is deleted for some reason. And now Windows 7 shows for Windows Explorer. Notepad, calculator and everything Windows related a "not found Icon" and it can't be started either.

I even tried to get System Restore started and it can't start saying missing parameter in Environment variables. I obviously can't get in System variables either to reset the path myself.

Is there a way to fix this or do I have to reinstall Windows for such minor thing?

share|improve this question

migrated from stackoverflow.com Sep 26 '11 at 11:32

This question came from our site for professional and enthusiast programmers.

    
What exactly happens when you run a file? –  SLaks Sep 26 '11 at 11:36

1 Answer 1

up vote 2 down vote accepted

You didn't lose the %PATH% variable; you lost the association for .exe files.

Go to a working Win7 computer, export HKCR\.exe and HKCR\exefile.
Then, either:

  • Press Windows+R, type command.com, type regedit, then import the files

If that doesn't work,

  • Go to the Windows Recovery Environment (from the installation CD) on the broken machine, run regedit, mount the key Windows\System32\Config\Software, and apply your exported keys to the mounted file.
    (You'll need to replace HKCR in the exported files with whatever path you mounted the key as; you may find it easier to recreate the keys yourself)
share|improve this answer
1  
The problem that Kave has is possible, in fact, I destroy that variable executing a bugged powershell script. I was capable to fix the problem because i destroy the user PATH variable found in HKCU:\Environment, the system PATH was intact, so i just copy the system Path found in 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' over the user path. I lost all personalized directories that i added to that variable but my session works fine again. :D –  mjsr Sep 26 '11 at 12:57
    
@voodoomsr: Yes. He actually lost the association for .exes. I've seen viruses do that. –  SLaks Sep 26 '11 at 13:09
    
Many Thanks for your help guys. Yes this is the exact behavior. Most executables don't seem to run, even though I was able to run ToySync 2.0 to backup my pictures and Chrome.exe was fine too. But Everything Windows related is not executable. Maybe as you suggested it could be a Virus. I will check this tonight and report back. –  Kave Sep 26 '11 at 16:31
    
Ok I am home now and the Firewall and Microsoft Security Essentials are disabled. it must be a virus. I cant even install AVAST. I sthere any command line virus scanner I could download with my laptop and check the PC with a USB stick? Many Thanks –  Kave Sep 26 '11 at 18:39
    
Does command.com work? –  SLaks Sep 26 '11 at 19:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.