The Script Manager allows you to write and test scripts to run on crash dumps. Scripts can be automatically run on each new crash dump to gather common information. You can also run a script from the Debug menu or by right-clicking a cab.
StackHash scripts are run using the Debugging Tools for Windows. If the StackHash service is running on a 64-bit system then the 32-bit tools are used for 32-bit dumps and the 64-bit tools are used for 64-bit dumps. StackHash runs each command in the script using cdb.exe, a command line debugger. Cdb.exe uses the same debugging engine as WinDbg so the command syntax is identical.
Note that your WinHttp proxy configuration can prevent cdb.exe from accessing symbols from the Internet. If you experience difficulties accessing public symbols see Cdb from a Windows Service.
Each line of a script is passed to cdb.exe and the output is captured by StackHash for you to review. You may find it helpful to develop a script interactively in WinDbg and then enter the desired commands in StackHash.
An optional comment can be added to each line of the script using the * character, i.e.:
.kp * Print Stack
Only the last * is treated as a comment so for commands that include the * character a comment is required, i.e.:
.shell dir *.dll * Comment is required
Comments are not permitted for the .sympath, .srcpath and .exepath commands. Any comment added following these commands will be treated as part of the script line.
When running a script StackHash initializes the symbol and executable image search paths with the defaults specified in the current profile. You can edit the defaults in Tools -> Service Options -> Edit Profile -> 32-bit Debugger and 64-bit Debugger.
You can add to or replace each search path from a script using .sympath, .srcpath and .exepath.
Add to a search path by including + after the path command:
.sympath + C:\LocalSymbols .sympath + "Z:\More Symbols\"
Replace the default search path by omitting the + after the path command:
.sympath C:\JustTheseSymbols
The same syntax is used with .srcpath and .exepath to set the source search path and the executable image search path.