@if "%_echo%"=="" echo off
setlocal
set TIMESTAMP=%DATE:~-9%_%TIME%
set TIMESTAMP=%TIMESTAMP:/=_%
set TIMESTAMP=%TIMESTAMP::=_%
set TIMESTAMP=%TIMESTAMP:.=_%
set TIMESTAMP=%TIMESTAMP: =_%
set FILENAME=c:\crash_%TIMESTAMP%.dmp
set LOG=c:\log.txt
set COMMAND=c:\debuggers\cdb.exe -c ".dump /o /mhf %FILENAME%;q" -p %1
echo %COMMAND% > %LOG%
%COMMAND%
endlocal
1.在命令提示符处键入以下命令,然后按 ENTER 键: cd \Inetpub\adminscripts
2.要使孤立工作进程的功能可用,需要在命令提示符下键入以下命令: adsutil.vbs SET W3SVC/AppPools/DefaultAppPool/OrphanWorkerProcess TRUE
3.在命令提示符下,设置当进程预定要回收时运行的可执行文件。例如,在这种情况下使用在“创建一个批处理文件,在一个工作进程被孤立时执行”一节创建的批处理文件: adsutil.vbs SET W3SVC/AppPools/DefaultAppPool/OrphanActionExe "c:\action.cmd"
adsutil.vbs SET W3SVC/AppPools/DefaultAppPool/OrphanActionParams "%%1%%"