共用方式為


Another good reason why I think we should deprecate AutoRun setting from Command Processor

The cause for this nasty to diagnose behavior was that in customer's machine, when you ran "cmd.exe /c cd" with "c:\program files\debugging tools for windows" as the current directory, it was returning "c:\" as the actually set current directory.

It happened that customer had a "CD \" in his "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\AutoRun". So, when ADPLUS.vbs script invoked "cmd /c tlist.exe > …" it failed because it couldn't find tlist.exe under the root of C: and its path wasn't part of the PATH environment variable.

I have also found this post in Raymond's blog which also talks about same concern with AutoRun.

This is the email a colleague posted to an internal distribution list, asking for help.


From: <Removed_Intentionally>
Sent: <Removed_Intentionally>
To: <Removed_Intentionally>
Subject: Error while running ADPlus command line to take Dump

I wonder if you can give me some light on this:

My customer is trying to run ADPlus (after installing Debugging Tools for windows ) See steps in the e-mail bellow. However when he runs the command from the command line he receives the following errors:

*** ERROR ***

*** ERROR ***

*** ERROR ***

The file Process_List.txt was never closed (finished writing) by tlist.exe in the c:\dumps\Crash_Mode__Date_01-04-2007__Time_13-44-2525 directory after waiting for 10 seconds.

This could indicate that there was a problem running tlist.exe or that the file could not be read using the Scripting.FileSystemObject.

Please try running tlist.exe manually from the C:\Program Files\Debugging Tools for Windows directory or re-register scrrun.dll and try running ADPlus again.

For full report see file ADPlus_Report.txt file attached.

Can anybody tell me how to solved this error in order to be able to take the Dump?

Thanks a lot,

<Removed_Intentionally>

STEPS FOLLOWED:

================

  1. Take a Dump with ADPlus in Crash mode following the steps:

1. Install Debugging Tools for Windows in the Server. You can download them from http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx (Debugging tools for windows para 32 bits) It could be necessary to restart the machine after the installation. You can copy them to a folder named “Debugging Tools for Windows”.

2. Create a file called httpexception.cfg in the directory “Debugging Tools for Windows” with the following content:

· Substitute the path where the Dump will be generated by c:\temp if necessary.

· If the Operating System was Windows 2000, substitute w3wp.exe by aspnet_wp.exe. If it is Windows 2003 there is no need to modify it.

<ADPlus>

   <Settings>

       <RunMode> CRASH </RunMode>

  <OutputDir> c:\dumps </OutputDir>

<Option> Quiet </Option>

<ProcessName> w3wp.exe </ProcessName>

   </Settings>

   <PreCommands>

       <!-- defines a set of commands to execute before the sxe and bp commands -->

  <cmd>r $t1 = 0</cmd>

  <cmd>!loadby sos mscorwks</cmd>

</PreCommands>

   <Exceptions>

       <Config>

           <Code>AllExceptions</Code>

           <Actions1>Log</Actions1>

           <Actions2>Void</Actions2>

       </Config>

<Config>

<Code>CLR</Code>

<Actions1>Log</Actions1>

<CustomActions1> !soe System.Web.HttpException 1;.if(@$t1==1) {.echo System.Web.HttpException occured';.dump /u /ma c:\dumps\HttpException.dmp;gn} .else {.echo 'other exception occurred';!clrstack;gn} </CustomActions1>

</Config>

   </Exceptions>

</ADPlus>

3. From the command line (from the directory “Debugging tools for windows”) run the following command:

Cscript Adplus.vbs –c httpexception.cfg

This command will cause that the debugger (cbd.exe) join each process w3wp.exe and generate a Dump when the exception HttpException occurs (It waits until the exception happens)