{"id":97046,"date":"2017-09-19T07:00:00","date_gmt":"2017-09-19T21:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/?p=97046"},"modified":"2019-03-13T01:16:58","modified_gmt":"2019-03-13T08:16:58","slug":"20170919-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20170919-00\/?p=97046","title":{"rendered":"The NET HELPMSG command will decode Windows error codes, at least the simple ones"},"content":{"rendered":"<p>A quick and dirty way to convert Windows error codes to strings is to use the <code>NET HELPMSG<\/code> command. <\/p>\n<pre>\nC:\\&gt; NET HELPMSG 2\n\nThe system cannot find the file specified.\n\nC:\\&gt; NET HELPMSG 8242\n\nAn invalid dn syntax has been specified.\n<\/pre>\n<p>The command is not infallible, however. <\/p>\n<ul>\n<li>It operates only on Windows error codes.     It doesn&#8217;t decode <code>HRESULT<\/code> or     <code>NTSTATUS<\/code> values. <\/li>\n<li>It doesn&#8217;t support messages with insertions,     presumably because     <a HREF=\"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/20071128-00\/?p=24353\">    it doesn&#8217;t pass the     <code>FORMAT_<\/code><code>MESSAGE_<\/code><code>IGNORE_<\/code><code>INSERTS<\/code>     flag<\/a>. <\/li>\n<\/ul>\n<p>If you pass a message with an insertion, such as <code>ERROR_<\/code><code>WRONG_<\/code><code>DISK<\/code>, then instead of getting <\/p>\n<pre>\nThe wrong diskette is in the drive.\nInsert %2 (Volume Serial Number: %3) into drive %1.\n<\/pre>\n<p>you get&sup1; <\/p>\n<pre>\nC:\\&gt; NET HELPMSG 34\n\n34 is not a valid Windows network message number.\n\nMore help is available by typing NET HELPMSG 3871.\n<\/pre>\n<p>Still, it&#8217;s better than nothing. <\/p>\n<p>&sup1; As a bonus insult, if you type the suggested command, you get this: <\/p>\n<pre>\nC:\\&gt; NET HELPMSG 3871\n\n*** is not a valid Windows network message number.\n<\/pre>\n<p>Yeah, um, that really didn&#8217;t tell me anything new. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s originally for decoding network error messages, but it doesn&#8217;t actually care.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[104],"class_list":["post-97046","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-tipssupport"],"acf":[],"blog_post_summary":"<p>It&#8217;s originally for decoding network error messages, but it doesn&#8217;t actually care.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/97046","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=97046"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/97046\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=97046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=97046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=97046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}