在 Windows 7 上禁用应用程序故障转储

发布于 2024-11-08 11:31:06 字数 283 浏览 5 评论 0原文

愚蠢的问题:如何防止 Windows 7 存储崩溃应用程序的内存转储?

我正在 C++ 应用程序中试验堆栈分配,因此玩具程序经常崩溃。对于每次崩溃,Windows 都会将内存转储到 %USER%/AppData/Local/CrashDumps。每个大约150MB。我如何禁用此功能?我在互联网上进行了广泛的搜索。我在 Windows 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

囚你心 2024-11-15 11:31:06

我认为负责在系统上创建所有这些转储文件的机制是 WER(Windows 错误报告)。您可以阅读如何禁用它:http://www. techrena.net/windows/disable-windows-7-error-reporting/

  1. Win + R 打开 Windows 运行命令。键入在运行命令栏中输入“services.msc”,然后点击“确定”。
  2. 这将打开“服务”窗口,您可以在其中查看 Windows 上当前可用的所有服务的列表。
  3. 右键单击Windows错误报告服务并选择“属性”。启动类型默认为“自动”或“手动”。要完全禁用该服务,请选择“禁用”并按“好的'。

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'.
暗喜 2024-11-15 11:31:06

要禁用内存转储文件的创建或创建方式,请打开 regedit 并导航到以下注册表项:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl

找到此项后,单击它并根据选项更改“CrashDumpEnabled”的值如下:

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

然后重新启动计算机使其生效。

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.

潇烟暮雨 2024-11-15 11:31:06

HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting 下,将 Disabled 设置为 REG_DWORD 等于 1

来源:MSDN

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

Source: MSDN

简单 2024-11-15 11:31:06

为您的应用调用 WerAddExcludedApplication 函数

Call WerAddExcludedApplication fuction for your app

旧话新听 2024-11-15 11:31:06

禁用错误报告服务(WER - Windows 错误报告)不足以停止写入 %LOCALAPPDATA%\CrashDumps 文件夹。唯一对我有帮助的方法是限制写入文件夹。这可以通过禁止所有用户写入CrashDumps文件夹的安全设置中完成。或者在CMD中运行命令:

reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /v Dump Count /t REG_DWORD /d 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.

待"谢繁草 2024-11-15 11:31:06

我一直无法找到解决方案(始终创建转储),但是您可以使它们更小:(

在 Win 7 和 Win 10 上测试)

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

DWORD “转储类型”为 0
DWORD "CustomDumpFlags" to 0

DumpType to 0 不会禁用转储,而是将它们设置为“自定义转储”

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文