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.

I have a Windows 7 PC, and since a couple of days ago if I try to open notepad i get the following error:

Windows cannot find C:\Windows\System32\notepad.exe. Make sure you typed the name correctly, and they try again.

By performing a search I found that notepad.exe in c:\windows, c:\windows\system and c:\windows\system32, and in all three locations I have tried to replace it with the file taken from another Windows 7 PC but I get the same error.

share|improve this question
    
Are you able to browse to windows\system32 and double-click it from there yourself? –  mtone Jan 14 '10 at 23:29

8 Answers 8

Got same issue after playing with replacing notepad by notepad++. In order to restore normal behaviour I have to delete one key in windows registry.

  1. open windows registry editor (as administrator)
  2. open

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
    
  3. remove (if exists) notepad.exe

For me it worked like a charm. Remember to make registry backup before removing and of course you do it on your own risk.

share|improve this answer

Just for your information, here's the reason why there are multiple locations for Notepad:

Windows 3.0 put Notepad in the Windows directory. Windows NT put it in the System32 directory.

Notepad is perhaps the most commonly hardcoded program in Windows. many Setup programs use it to view the Readme file, and you can use your imagination to come up with other places where a program or batch file or printed instructions will hard-code the path to Notepad.

The article is an interesting read. If you want more information, read also the comments for more insight into the matter.

share|improve this answer

Are you sure the path in the error message you typed here is exactly as it is in the error message you see? If the file exists, as you found when you searched, it shouldn't throw this error message.

What have you installed or modified in the last couple days? Can you go back to a System Restore point prior to those changes?

share|improve this answer
    
I am sure the path is correct. I have installed updates, but I've did the same on two other Windows 7 computers and they have no problem. I cannot go back a System Restore point. –  Iulian Chira Jan 14 '10 at 21:55

How are you opening notepad? Try open a command prompt and typing in C:\Windows\system32\notepad.exe and see if that works. If it does, try recreate the shortcut.

It all else fails, maybe you could try install Notepad2 over notepad.

share|improve this answer

Search with Everything. If it's there, anywhere, it'll find it. You only need to search a few key elements, so just notepad.exe will do it. If no result, then it's gone.

You could of course take this opportunity to replace it with an alternative. I'd recommend notepad2.

share|improve this answer

I have encountered a similar issues if my %PATH% environment variable is too long. Check your environment variables and see if there are any old uninstalled programs still sitting in your PATH variable and remove them.

I don't know why it happens but if PATH is too long windows will fail at turning %windir% in to C:\Windows so when it attemps to open %windir%\notepad.exe it can't find the exe.

share|improve this answer

I have had this problem since upgrading from Textpad 5 to Textpad 6, which has an option to 'Replace Notepad'. I could not run notepad by double-clicking, or launching from a command prompt from any of its many locations.

Further to the above post, I found the reg key

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\Notepad.exe

had a "Debugger" reg_sz value which pointed to the non-existent Textpad 5. So the debugger value overrides the requested image file with an alternate image file of your choice. Nice, if a little dangerous because any Windows image file can be silently overridden.

So manually correcting the path to Textpad worked for me.

Hope this helps.

share|improve this answer

The correct notepad is in C:\Windows\notepad.exe. That's the one that's started on my computer.

Try to launch it directly, by running "C:\Windows\notepad.exe" and see if it starts.

If it starts correctly, then something is wrong with the path.
If it doesn't start, then something is wrong with the permissions on notepad.exe.

share|improve this answer

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.