7

Silly question: How do I prevent Windows 7 from storing the memory dump of a crashed application?

I'm experimenting with the stack allocation in a C++ application, so the toy program crashes a lot. And for each crash, Windows dumps the memory to the %USER%/AppData/Local/CrashDumps. It's about 150MB each. How do I disable this? I've searched the internet far and wide. The only thing I could find on Windows 7 is System→Advanced→Startup and Recovery→System failure crash dumps, and I already disabled these.

It's not really a big deal, just annoying because it sits in my user profile.

Andreas
  • 5,393
  • 9
  • 44
  • 53
Norbert P.
  • 2,767
  • 1
  • 18
  • 22

4 Answers4

6

I think the mechanism responsible for creating all those dump files on your system is WER (Windows Error Reporting). You can read on how to disable it there: http://www.techrena.net/windows/disable-windows-7-error-reporting/

  1. Press Win + R to open the Windows Run command.Type “services.msc” in the run command bar and hit ‘OK’.
  2. This will open up Services window where you can see list of all the services that are currently available on your Windows.
  3. Right click on the Windows Error Reporting Service and choose “Properties". The startup type will be either in “Automatic” or “Manual” by default. To completely disable the service choose “Disabled” and press 'OK'.
Andreas
  • 5,393
  • 9
  • 44
  • 53
franmon
  • 2,057
  • 2
  • 19
  • 25
  • Disabling that service does not stop dumps from being generated in the mentioned folder on my machine. – Zero3 Apr 10 '20 at 21:58
1

In order to disable the creation of a memory dump file or how one is created, open regedit and navigate to the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl

Once you've found this key, click on it and change the value of "CrashDumpEnabled" according to the options below:

0 = None
1 = Complete memory dump
2 = Kernel memory dump
3 = Small memory dump (64KB)

Then restart your computer for it to take effect.

Anonymous
  • 11
  • 1
  • 3
    These steps are for disabling of system memory dumps, and not for application dumps. System memory dump happens when the entire OS crashes. – Sahil Singh Oct 18 '18 at 23:08
1

Under HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting, set Disabled to REG_DWORD equal 1

Source: MSDN

kiewic
  • 15,852
  • 13
  • 78
  • 101
0

Call WerAddExcludedApplication fuction for your app

Alex Guteniev
  • 12,039
  • 2
  • 34
  • 79