Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I often use notepad.exe for temporary messages. I never use it for something I need to save: I have normal text editors and MS OneNote for that.

When I shut down, multiple instances of Notepad is asking to save. What's worse, because of the Windows bug, when I press “no don’t save”, the notepad application stays alive, so I have to close it manually, and once again press “no don’t save”.

I’ve been fighting this problem for years. About 2 years ago, I’ve asked one of the software developers in my team to hack notepad.exe so it doesn’t asks for saving. Unfortunately, I had to reinstall my Windows recently, and I no longer work with that brilliant guy.

Then I’ve tried to use group policy with taskkill /f /im notepad.exe logoff script, only to find out the logoff script is executed after all application are terminated.

I don’t want to install third-party notepad replacements.

I don’t want to disable shutdown prevention at all by tweaking registry. I want the apps like word and excel to be able to prevent shutdown. The problem is only with notepad.

Any ideas? Thanks in advance.

share|improve this question
I can't say I've run into the "Windows bug" to which you refer. – user3463 Sep 13 '12 at 5:50
Amusingly I use that specifically to keep windows from shutting down when I don't want it to. – Journeyman Geek Sep 13 '12 at 6:00
@RandolphWest, steps to reproduce: 1. Open notepad, type something. 2. Press Windows, Logoff. Wait for the screen to dim, saying "1 program still need to close". 3. Press Cancel on that screen. 4. You'll see a notepad asking "do you want to save changes?" with buttons "Save, Don't Save, Cancel". Press "Don't Save". Expected result: notepad should quit without saving. Actual result: notepad stays running. After that "1 program still need to close" screen, "Don't Save" and "Cancel" buttons are equivalent - WTF? – Soonts Sep 13 '12 at 9:28
It turns out I've been using Notepad2 for so many years, I've not run into this on Vista or Windows 7 :-) – user3463 Sep 13 '12 at 17:27

How about removing Shutdown and Restart from the Start Menu, disabling the Switch User, Log off and Lock options as well, then creating your own batch files for these actions that will first taskkill notepad and then perform the action (shutdown etc.) required using shutdown.exe or rundll32? You can pin the batch file shortcuts to the taskbar or Start Menu, and even assign keyboard shortcuts to them.

share|improve this answer

Your Answer


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.