I want to integrate the initiation of this troubleshooter into a python script.

I've found https://blogs.msdn.microsoft.com/mattbie/2010/11/09/running-a-troubleshooter-from-the-command-line/ which lists various commands to open different Troubleshooters but the "Identify and Repair Network Problems" is nowhere to be found.

When there's a problem with the internet connection, clicking on the ethernet icon in the system tray opens this troubleshooter or you could open the same by searching "Identify and Repair Network Problems" in the search box of taskbar.

  • I'm not entirely sure that there's a command for that. You can access this through control panel though in the Network and Sharing Centre.
    – NiallUK
    Jun 5, 2019 at 8:13
  • Yeah, but I wanted to integrate this functionality in to a python program. Thanks anyway. Jun 6, 2019 at 3:56

1 Answer 1


You can run the "Identify and Repair Network Problems" troubleshooter using this command line:

msdt -skip TRUE -path C:\Windows\diagnostics\system\networking -ep NetworkDiagnosticsConnectivity

Where -skip TRUE allows you to skip the first screen and go straight into the diagnostics.

or this one:

rundll32.exe,C:\Windows\system32\Rundll32.exe ndfapi,NdfRunDllDiagnoseIncident

If you start the "Identify and Repair Network Problems" troubleshooter and then run wmic process where "caption='rundll32.exe' or caption='msdt.exe'" get /format:csv, you will notice something like the following:

rundll32.exe,C:\Windows\system32\Rundll32.exe ndfapi,NdfRunDllDiagnoseIncident,11088,10272
msdt.exe, -skip TRUE -path C:\Windows\diagnostics\system\networking -af C:\Users\<user>\AppData\Local\Temp\NDFBC7D.tmp -ep NetworkDiagnosticsConnectivity,10272,10528

Based on that, clicking on the troubleshooter shortcut runs C:\Windows\system32\Rundll32.exe ndfapi,NdfRunDllDiagnoseIncident, which starts msdt.exe with an unusual command line that doesn't contain msdt.exe.

This command-line can't be run by itself. The NDFBC7D.tmp file seems to be created by the rundll32.exe process, so removing the -af switch solves that issue and allows you to run the troubleshooter without rundll32.exe.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .