程序奔溃,会生产dump在系统目录,但是系统目录藏得很深,每次不好取,今天写了一个批处理bat,来方便设置不同程序得LocalDumps目录。
@echo off color 2e title 设置进程LocalDumps目录 by guoguo 20220805 echo 设置进程LocalDumps目录 echo 删除请输入del set dumppatch=D:\dump :start set Process=0 set /p Process=添加程序进程(如:chrome): if %Process%==exit exit if %Process%==del (goto :delProcess) else (goto :addProcess) :addProcess if %Process%==0 echo "空值!返回开始"&&goto :start reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\%Process%.exe" /f /v DumpFolder /t REG_EXPAND_SZ /d "%dumppatch%\%Process%" reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\%Process%.exe" /f /v DumpType /t REG_DWORD /d "2" goto :start :delProcess set /p Process=删除程序进程(如:chrome): if %Process%==exit exit if %Process%==del echo "空值!返回开始"&&goto :start reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\%Process%.exe" goto :start exit
转载请注明:果果.IT » 设置Windows程序LocalDumps目录