Freigeben über


It is indeed a pleasure to introduce to you – Windows Troubleshooting Platform: Referencing Inbox Windows Troubleshooting Packs From Command Line

Alright dudes, it’s time to take a look at some basics. In the spirit of Bill and Ted’s Excellent Adventure, we will travel a bit back in time to use some pretty bodacious features in Windows 7, still totally applicable in Windows 8. Our travels today will not result in obtaining Genghis Khan or a totally awesome history report. With this information you, as a most excellent support application developer, can seriously impress your comrades as outrageously resourceful by being able to invoke a built-in Windows troubleshooting pack from your application. Is your customer bummed out because your app relies on internet connectivity and they’re getting an internet connection error? They may be demonstrating some egregious and maybe unnecessary frustration with you, blaming your software for something that Windows can address on the spot. To make this simple, all you really need to do is add functionality in your application to run the Networking Troubleshooter from commandline. Ready to be a hero? It’s time to party on with Windows Troubleshooting Platform, dudes.

Let’s begin with a little terminology. What’s an “inbox troubleshooter”? Well, it’s a fancy name for a troubleshooter that’s already part of Windows. Got it? Awesome.

Now, all inbox Windows troubleshooters have an attribute called a “Troubleshooting Pack ID” which identifies the troubleshooter so it can be invoked from the command line. This is most convenient if you would like to run a Windows Troubleshooting Pack from your own application. To accomplish this task, you can use the following command line syntax:

msdt–id [Troubleshooting Pack ID]

Here are some quick examples:

Audio Playback MSDT –id AudioPlaybackDiagnostic
Hardware and Devices MSDT –id DeviceDiagnostic
Internet Connections MSDT –id NetworkDiagnosticsWeb
[Custom local diagnostic] MSDT –cab [Path_to_diagcab_file]

Easy, right? There are lots more Troubleshooting Pack IDs you can reference at the end of this article. Just one moment, my most stellar developer – there’s more you should know. You’ll have this all figured out in no time, but there are a few little gotchas…

Windows 7 “Online” Troubleshooting Packs - WOTS

You may have heard of WOTS. Chances are you haven’t. Well my excellent friends, WOTS stands for “Windows Online Troubleshooting Service”. Tangentially, you must first know that you absolutely can build your very own custom troubleshooting packs and run them directly from your PC of choice. After all, troubleshooters built with Windows Troubleshooting Platform are simply collections of scripts packaged as a .diagcab file. I’ll explain all that in a different post. Promise. For now, you just need to know that WOTS is a way of hosting these packages online – when your Windows 7 machine is connected to the interwebs, it automatically downloads the online package. When it’s not connected, it’s not there. Got it? Maybe not? Keep reading.

When you’re not online, Windows 7 gives you a particular set of troubleshooting packs. When you get online, you get some new or updated ones. In most cases, five “online” Troubleshooting Packs are enabled when you select the “Get the most up-to-date troubleshooters from Windows Online Troubleshooting Service” checkbox at the bottom of the Control Panel> All Control Panel Items window as seen below:

Now dudes and dudettes, these five hosted troubleshooting packs are as follows:

  • Display Quality
  • Performance (updated)
  • Playing and Burning CDs, DVDs, and Blu-Ray Discs
  • Set Up a TV Tuner
  • Windows Update (updated)

(Hint: The default view in Control Panel is totally hard to read. If you want to see a clearer listing of the troubleshooters, click “View All” and you’re have a rather nice list of them)

There’s one additional troubleshooting pack for configuring devices (not shown in the Control Panel) that can be run by right-clicking devices under Control Panel > All Control Panel Items > Devices and Printers:

  • Device Center (updated) – this is a contextually launched troubleshooter that can be useful in the case of troubleshooting a specific device. It is totally unwise to run this troubleshooter without the parameters of the device you are troubleshooting.

Of these online Troubleshooting Packs, the Performance, Device Center, and Windows Update Packs have updated versions published to WOTS by Microsoft (for reference, I put (updated) next to those in the list above). The original versions are available locally and can be launched when the computer is offline.

Display Quality, Playing and Burning CDs, DVDs, and Blu-Ray Discs, and Set Up a TV Tuner, all hosted on WOTS, are not available locally when the computer is offline. If you attempt to invoke these Troubleshooting Packs from the command line without being connected to the internet, you will see the following prompt:

If you want to run the Display Quality, Playing and Burning CDs, DVDs, and Blu-Ray Discs, or Set Up a TV Tuner Troubleshooting Packs, you have to make sure the device is connected to the internet with WOTS enabled as shown above.

Does that make you dizzy? Wooooaaah. Don’t worry. That’s why I’m writing all this down so you can reference it later when you need it, dude. Think of it as a little tidbit left here to remind you throughout your Circuits of Time coding travels.  

Troubleshooting Pack IDs

The list below shows all Windows inbox Troubleshooting packs and their respective Troubleshooting Pack IDs:

Name

Location

Troubleshooting Pack ID

Aero

Local

AeroDiagnostic

Connection to a Workplace Using DirectAccess

Local

NetworkDiagnosticsDA

Device Center (invoked only in Device Center)

Online

DeviceCenterDiagnostic

Display Quality

Online

DisplayQualityDiagnostic

Hardware and Devices

Local

DeviceDiagnostic

HomeGroup

Local

HomeGroupDiagnostic

Incoming Connections

Local

NetworkDiagnosticsInbound

Internet Connections

Local

NetworkDiagnosticsWeb

Internet Explorer performance

Local

IEBrowseWebDiagnostic

Internet Explorer safety

Local

IESecurityDiagnostic

Network Adapter

Local

NetworkDiagnosticsNetworkAdapter

Performance

Online

PerformanceDiagnostic

Playing Audio

Local

AudioPlaybackDiagnostic

Playing and Burning CDs, DVDs, and Blu-Ray Discs

Online

CDDVDDiagnostic

Power

Local

PowerDiagnostic

Printer

Local

PrinterDiagnostic

Program Compatibility

Local

PCWDiagnostic

Recording Audio

Local

AudioRecordingDiagnostic

Search and Indexing

Local

SearchDiagnostic

Set up a TV Tuner

Online

MediaCenterSetupDiagnostic

Shared Folders

Local

NetworkDiagnosticsFileShare

System Maintenance

Local

MaintenanceDiagnostic

Windows Media Player DVD

Local

WindowsMediaPlayerDVDDiagnostic

Windows Media Player Library

Local

WindowsMediaPlayerLibraryDiagnostic

Windows Media Player Settings

Local

WindowsMediaPlayerConfigurationDiagnostic

Windows Update

Online

WindowsUpdateDiagnostic

Awesome, huh? [insert air guitar solo here]

Excellent……But Where can I find my Troubleshooting Pack ID?

Okay, there’s one more thing you gotta know. What if you have a custom made troubleshooter on your PC and you have no idea what it is? Most non-triumphant. If for some reason you cannot locate a Troubleshooting Pack ID, you can just run the troubleshooter and step through it until it starts to detect the root cause(s). Try it with one of the inbox troubleshooters first. Go ahead and run it, then open the C:\Windows\Temp directory. Look for a new folder created at the time you launched the troubleshooting pack. This folder will have a random name, but will begin with the letters “SDIAG_”. Inside this folder, look for DiagPackage.diagpkg and open this file with a text editor (i.e. notepad). In the first several lines of XML, you will notice the <ID> tag under <DiagnosticIdentification>. This will give you the Troubleshooting Pack ID of the pack you just ran. See the example XML below:

  <DiagnosticIdentification>

    <ID>PerformanceDiagnostic</ID>

    <Version>1.0</Version>

  </DiagnosticIdentification>

Next time, I’ll tell you more about what these troubleshooting packs are all about and show you how to build them. For now, you are dealing with the oddity of troubleshooting with the greatest of ease and can help your customers easily avoid bogus situations by being able to code a ready-made troubleshooting pack into your application. Isn’t being excellent to each other what it’s all about? Later.

Supplemental Information

Comments

  • Anonymous
    January 01, 2003
    Awesome! I'm not sure which is better the content...or the fact that you conveyed it in a totally radicle bill and ted way! Maybe the best TED talk ever! ;-)