1. #1
    jcgriff2's Avatar
    Join Date
    Feb 2012
    Location
    New Jersey Shore
    Posts
    16,591
    • specs System Specs
      • Manufacturer:
        HP
      • Model Number:
        HP ENVY TouchSmart 17-j130us Notebook - E8A04UA
      • Motherboard:
        HP Insyde 720265-501 6050A2549501-MB-A02
      • CPU:
        Intel Core i7-4700MQ Processor with Turbo Boost up to 3.4GHz.
      • Memory:
        12GB DDR3L SDRAM (2 DIMM)
      • Graphics:
        Intel HD graphics 4600 with up to 1792MB total graphics memory
      • Sound Card:
        Beats Audio quad speakers and two subwoofers
      • Hard Drives:
        1TB 5400RPM hard drive with HP ProtectSmart Hard Drive Protection
      • Disk Drives:
        Hitachi 500 GB SSD; 7 TB USB External
      • Power Supply:
        90w
      • Case:
        Laptop
      • Display:
        17.3-inch diagonal HD+ BrightView LED-backlit touchscreen display (1600 x 900)
      • Operating System:
        Windows 8.1

    Add Windbg (kd>) Commands to Program Default for Dump Files

    Most of us have Windbg set up as the default program for dump files - Register Windbg for dump files (File Associations)

    Did you know that you can also add kd commands to run by default as well?

    Simply setting up Windbg as the default program leaves Windbg at this point after double-clicking on a dump file -- waiting for you to enter additional commands at the kd> line such as !analyze -v -
    Code:
    *******************************************************************************
    *                                                                             *
    *                        Bugcheck Analysis                                    *
    *                                                                             *
    *******************************************************************************
    
    Use !analyze -v to get detailed debugging information.
    
    BugCheck 50, {fffff80011b0e74d, 8, fffff80011b0e74d, 2}
    
    Could not read faulting driver name
    Probably caused by : ntkrnlmp.exe ( nt! ?? ::FNODOBFM::`string'+43346 )
    
    Followup: MachineOwner
    ---------
    I changed my default set up to include these commands -
    Code:
    !analyze -v;r;kv;lmtn;lmtsmn;.bugcheck
    So, when I double-click on a dump file, all of the basic commands that I like to run do so without me having to enter them at the kd> command line.

    Try it out!

    Back up your registry first (I opted to create a system restore point).

    Maneuver to this registry key and add your default Windbg commands -

    Code:
    HKLM\SOFTWARE\Classes\WinDbg.DumpFile.1\shell\Open\command
    The (Default) should look something like this (by default):
    Code:
    "C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x64\windbg.exe" -z "%1"
    I added the kd commands that I mentioned above (listed in RED):
    Code:
    "C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x64\windbg.exe" -z "%1" -c "!analyze -v;r;kv;lmtn;lmtsmn;.bugcheck"
    Double-clicking on a dump file now runs all of the commands in RED by default.

    Please note that I made these changes yesterday for the first time, so it is far from 100% tested.

    Regards. . .

    John
    Last edited by jcgriff2; 04-15-2017 at 10:40 PM.
    usasma, axe0, Tekno Venus and 7 others say thanks for this.


    • Ad Bot

      advertising
      Beep.

        
       

  2. #2

    Join Date
    Mar 2015
    Posts
    8,074

    Re: Add Windbg (kd>) Commands to Program Default for Dump Files

    Sorry for the "gravedig", but I just followed these instructions on my work laptop that have WinDbg and it worked perfectly :) Thank you for the tip John, very useful. I'll be sure to do it on my home computer as well.
    jcgriff2 says thanks for this.

  3. #3
    jcgriff2's Avatar
    Join Date
    Feb 2012
    Location
    New Jersey Shore
    Posts
    16,591
    • specs System Specs
      • Manufacturer:
        HP
      • Model Number:
        HP ENVY TouchSmart 17-j130us Notebook - E8A04UA
      • Motherboard:
        HP Insyde 720265-501 6050A2549501-MB-A02
      • CPU:
        Intel Core i7-4700MQ Processor with Turbo Boost up to 3.4GHz.
      • Memory:
        12GB DDR3L SDRAM (2 DIMM)
      • Graphics:
        Intel HD graphics 4600 with up to 1792MB total graphics memory
      • Sound Card:
        Beats Audio quad speakers and two subwoofers
      • Hard Drives:
        1TB 5400RPM hard drive with HP ProtectSmart Hard Drive Protection
      • Disk Drives:
        Hitachi 500 GB SSD; 7 TB USB External
      • Power Supply:
        90w
      • Case:
        Laptop
      • Display:
        17.3-inch diagonal HD+ BrightView LED-backlit touchscreen display (1600 x 900)
      • Operating System:
        Windows 8.1

    Re: Add Windbg (kd>) Commands to Program Default for Dump Files

    Glad it worked out.

    The registry changes sure do save time from having to enter all of the KD commands manually for every dump -- which can add up quickly each day.

    No worries on the "grave dig" -- do so anytime; any thread.

  4. #4
    Sysnative Staff
    BSOD Kernel Dump Analyst
    Contributor
    axe0's Avatar
    Join Date
    May 2015
    Location
    The Netherlands
    Age
    22
    Posts
    672
    • specs System Specs
      • Manufacturer:
        Custom build
      • Motherboard:
        Gigabyte B150-HD3P-CF
      • CPU:
        Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
      • Memory:
        16GB DDR4 Crucial Ballistix Sport LT BLS8G4D240F
      • Graphics:
        Intel(R) HD Graphics 530
      • Sound Card:
        (1) Intel(R) Display Audio (2) Realtek HD Audio
      • Hard Drives:
        Crucial MX200 500GB & 2x Toshiba DT01ACA300
      • Power Supply:
        Corsair RM550x
      • Case:
        Fractal Design Define S
      • Cooling:
        Cooler Master TX3 i
      • Display:
        24" Liyama ProLite XB2483HSU-B2 & 24" Dell Ultrasharp U2414H
      • Operating System:
        Windows 10 Pro

    Re: Add Windbg (kd>) Commands to Program Default for Dump Files

    Works perfectly for me
    Do you have had any problems with the tweak?

  5. #5
    jcgriff2's Avatar
    Join Date
    Feb 2012
    Location
    New Jersey Shore
    Posts
    16,591
    • specs System Specs
      • Manufacturer:
        HP
      • Model Number:
        HP ENVY TouchSmart 17-j130us Notebook - E8A04UA
      • Motherboard:
        HP Insyde 720265-501 6050A2549501-MB-A02
      • CPU:
        Intel Core i7-4700MQ Processor with Turbo Boost up to 3.4GHz.
      • Memory:
        12GB DDR3L SDRAM (2 DIMM)
      • Graphics:
        Intel HD graphics 4600 with up to 1792MB total graphics memory
      • Sound Card:
        Beats Audio quad speakers and two subwoofers
      • Hard Drives:
        1TB 5400RPM hard drive with HP ProtectSmart Hard Drive Protection
      • Disk Drives:
        Hitachi 500 GB SSD; 7 TB USB External
      • Power Supply:
        90w
      • Case:
        Laptop
      • Display:
        17.3-inch diagonal HD+ BrightView LED-backlit touchscreen display (1600 x 900)
      • Operating System:
        Windows 8.1

    Re: Add Windbg (kd>) Commands to Program Default for Dump Files

    Here we are 3.5 years later and while I have received numerous THANK YOU PMs for this -- none have complained that it didn't work.

    So... All looks good.

  6. #6
    HyperHenry's Avatar
    Join Date
    Feb 2018
    Location
    Currently Texas
    Age
    16
    Posts
    40

    Re: Add Windbg (kd>) Commands to Program Default for Dump Files

    What OS was this used on? I have Windows 10 and in Software/Class.... WinDbg isn't there. Also I always install programs on a different disk.

  7. #7
    Sysnative Staff
    BSOD Kernel Dump Analyst
    Contributor
    axe0's Avatar
    Join Date
    May 2015
    Location
    The Netherlands
    Age
    22
    Posts
    672
    • specs System Specs
      • Manufacturer:
        Custom build
      • Motherboard:
        Gigabyte B150-HD3P-CF
      • CPU:
        Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
      • Memory:
        16GB DDR4 Crucial Ballistix Sport LT BLS8G4D240F
      • Graphics:
        Intel(R) HD Graphics 530
      • Sound Card:
        (1) Intel(R) Display Audio (2) Realtek HD Audio
      • Hard Drives:
        Crucial MX200 500GB & 2x Toshiba DT01ACA300
      • Power Supply:
        Corsair RM550x
      • Case:
        Fractal Design Define S
      • Cooling:
        Cooler Master TX3 i
      • Display:
        24" Liyama ProLite XB2483HSU-B2 & 24" Dell Ultrasharp U2414H
      • Operating System:
        Windows 10 Pro

    Re: Add Windbg (kd>) Commands to Program Default for Dump Files

    On my Windows 10 Pro 1703, registry export
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WinDbg.DumpFile.1\shell\Open\command]
    @="\"C:\\Program Files (x86)\\Windows Kits\\10\\Debuggers\\x86\\windbg.exe\" -z \"%1\" -c \"!load cmkd; !load procdumpext; !load niemiro; !analyze -v; lmtsmn; !rawstack; !dpx; !sysinfo smbios; !sysinfo machineid; !sysinfo cpuspeed; !thread; .bugcheck; .time;\""

Similar Threads

  1. [INFO] WinDbg Cheat Sheet - Data Structures, Commands and Extensions
    By x BlueRobot in forum BSOD Kernel Dump Analysis Debugging Information
    Replies: 11
    Last Post: 10-16-2017, 02:16 PM
  2. Register Windbg for dump files (File Associations)
    By jcgriff2 in forum BSOD Kernel Dump Analysis Debugging Information
    Replies: 6
    Last Post: 09-04-2017, 06:08 PM
  3. OSR Online - Analyst's Perspective: 10 WinDBG Commands You Might Not Know (But Should
    By jcgriff2 in forum BSOD Kernel Dump Analysis Debugging Information
    Replies: 0
    Last Post: 11-16-2012, 09:36 PM

Log in

Log in