Disable application crash dumps on Windows 7
Asked Answered
T

6

8

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.

Tweezers answered 17/5, 2011 at 18:2 Comment(0)
R
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'.
Roan answered 28/5, 2011 at 17:23 Comment(1)
Disabling that service does not stop dumps from being generated in the mentioned folder on my machine.Luhey
H
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.

Hemangioma answered 30/8, 2018 at 7:42 Comment(1)
These steps are for disabling of system memory dumps, and not for application dumps. System memory dump happens when the entire OS crashes.Baloney
V
1

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

Source: MSDN

Vibrio answered 20/4, 2019 at 1:31 Comment(1)
The dump files are still createdUltramontanism
L
0

Call WerAddExcludedApplication fuction for your app

Lusterware answered 11/9, 2021 at 19:55 Comment(0)
K
0

Disabling the Error Reporting service (WER - Windows Error Reporting) is not enough to stop writing to the %LOCALAPPDATA%\CrashDumps folder. The only way that helped me was to restrict writing to a folder. This can be done in the security settings of the CrashDumps folder by banning all users from writing. Or run the command in CMD:

reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /v Dump Count /t REG_DWORD /d 0

The parameter prohibits the number of dump files in the folder from being greater than zero.

Klaxon answered 10/12, 2023 at 20:45 Comment(0)
U
0

I haven't been able to find a solution (the dump are always being created), however you can make them smaller :

(tested on Win 7 & Win 10)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps

DWORD "DumpType" to 0
DWORD "CustomDumpFlags" to 0

DumpType to 0 doesn't disable the dumps but set them as "Custom Dump"

ref. : https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps?redirectedfrom=MSDN

Ultramontanism answered 16/2 at 13:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.