{"id":3171,"date":"2020-10-19T10:35:08","date_gmt":"2020-10-19T02:35:08","guid":{"rendered":"https:\/\/www.aoisnow.net\/blog\/?p=3171"},"modified":"2020-10-19T10:35:08","modified_gmt":"2020-10-19T02:35:08","slug":"tont-34563-%e5%bd%93%e4%ba%ba%e4%bb%ac%e8%a6%81%e5%b0%86%e5%ae%89%e5%85%a8%e6%bc%8f%e6%b4%9e%e4%bd%9c%e4%b8%ba%e5%8a%9f%e8%83%bd%e7%9a%84%e6%97%b6%e5%80%99%ef%bc%9a%e9%9d%99%e9%bb%98%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/www.aoisnow.net\/blog\/archives\/3171","title":{"rendered":"TONT 34563 \u5f53\u4eba\u4eec\u8981\u5c06\u5b89\u5168\u6f0f\u6d1e\u4f5c\u4e3a\u529f\u80fd\u7684\u65f6\u5019\uff1a\u9759\u9ed8\u5b89\u88c5\u672a\u7ecf\u8ba4\u8bc1\u7684\u9a71\u52a8"},"content":{"rendered":"<p>\u539f\u6587\u94fe\u63a5\uff1a<a href=\"https:\/\/devblogs.microsoft.com\/oldnewthing\/20050816-08\/?p=34563\" target=\"_blank\" rel=\"noopener\">https:\/\/devblogs.microsoft.com\/oldnewthing\/20050816-08\/?p=34563<\/a><\/p>\n<p>Probably the single greatest source of bluescreen crashes in Windows XP is buggy device drivers. Since drivers run in kernel mode, there is no higher authority checking what they\u2019re doing. If some user-mode code runs amok and corrupts memory, it\u2019s just corrupting its own memory. The process eventually crashes, but the system stays up. On the other hand, if a driver runs amok and corrupts memory, it\u2019s corrupting your system and eventually your machine dies.<\/p>\n<p>Windows XP \u84dd\u5c4f\u5d29\u6e83\u7684\u6700\u5927\u539f\u56e0\u4e4b\u4e00\u662f\u6709\u95ee\u9898\u7684\u8bbe\u5907\u9a71\u52a8\u3002\u7531\u4e8e\u9a71\u52a8\u8fd0\u884c\u5728\u5185\u6838\u6a21\u5f0f\u4e0b\uff0c\u5df2\u7ecf\u6ca1\u6709\u66f4\u9ad8\u7ea7\u522b\u7684\u673a\u5236\u6765\u76d1\u63a7\u5b83\u4eec\u5728\u505a\u4ec0\u4e48\u4e86\u3002\u5982\u679c\u4e00\u6bb5\u7528\u6237\u6a21\u5f0f\u4e0b\u7684\u4ee3\u7801\u53d1\u98d9\uff0c\u7834\u574f\u4e86\u5185\u5b58\u6570\u636e\uff0c\u90a3\u5b83\u4e5f\u53ea\u662f\u7834\u574f\u4e86\u5b83\u81ea\u5df1\u7684\u5185\u5b58\u6bb5\u800c\u5df2\u3002\u5176\u8fdb\u7a0b\u6700\u7ec8\u4f1a\u5d29\u6e83\uff0c\u4f46\u6574\u4e2a\u7cfb\u7edf\u8fd8\u662f\u597d\u597d\u7684\u3002\u53e6\u4e00\u65b9\u9762\uff0c\u5982\u679c\u67d0\u4e2a\u9a71\u52a8\u7a0b\u5e8f\u53d1\u98d9\uff0c\u7834\u574f\u4e86\u5185\u5b58\u6570\u636e\uff0c\u90a3\u5b83\u7834\u574f\u7684\u662f\u6574\u4e2a\u7cfb\u7edf\uff0c\u6700\u7ec8\u4f60\u7684\u673a\u5668\u4f1a\u505c\u6b62\u8fd0\u8f6c\u3002<\/p>\n<p>In acknowledgement of the importance of having high-quality drivers, Windows XP warns you when an uncertified driver is being installed. Which leads to today\u2019s topic, a question from a device driver author.<\/p>\n<p>\u9274\u4e8e\u9a71\u52a8\u9ad8\u8d28\u91cf\u7684\u91cd\u8981\u6027\uff0cWindows XP \u4f1a\u5728\u5b89\u88c5\u672a\u7ecf\u8ba4\u8bc1\u7684\u9a71\u52a8\u65f6\u8b66\u544a\u7528\u6237\uff0c\u8fd9\u5c31\u5f15\u51fa\u4e86\u4eca\u5929\u7684\u8bdd\u9898\uff0c\u662f\u4e00\u4f4d\u6765\u81ea\u67d0\u4e2a\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u4f5c\u8005\u7684\u63d0\u95ee\uff1a<\/p>\n<blockquote><p>When I try to install any driver, I get a User Consent Dialog box which tells the user that this is an unsigned driver. Is it possible to author a driver installation package that by-passes this user consent dialog box?<\/p>\n<p>\u5f53\u6211\u5c1d\u8bd5\u5b89\u88c5\u9a71\u52a8\u65f6\uff0c\u7cfb\u7edf\u90fd\u4f1a\u5f39\u51fa\u4e00\u4e2a\u8bf7\u6c42\u7528\u6237\u5141\u8bb8\u7684\u5bf9\u8bdd\u6846\uff0c\u544a\u8bc9\u7528\u6237\u6b63\u5728\u5b89\u88c5\u4e00\u4e2a\u672a\u7b7e\u540d\u7684\u9a71\u52a8\u3002\u6709\u6ca1\u6709\u529e\u6cd5\u7f16\u5199\u4e00\u79cd\u9a71\u52a8\u5b89\u88c5\u5305\uff0c\u80fd\u8ba9\u7cfb\u7edf\u4e0d\u663e\u793a\u8fd9\u4e2a\u5bf9\u8bdd\u6846\uff1f<\/p><\/blockquote>\n<p>The whole purpose of that dialog is to prevent the situation you desire from happening! [typo fixed 5pm] If you don\u2019t want the warning dialog, submit your driver for certification. (For testing purposes, you can sign your drivers with the test root certificate and install the test root certificate before running your setup program. Of course, installing the test root certificate also causes the desktop to read \u201cFor test purposes only\u201d as a reminder that your machine is now allowing test-signed drivers to be installed.)<\/p>\n<p>\u8fd9\u4e2a\u5bf9\u8bdd\u6846\u7684\u5b58\u5728\u610f\u4e49\uff0c\u53ef\u6b63\u662f\u963b\u6b62\u4f60\u6240\u60f3\u8981\u7684\u8fd9\u79cd\u4e8b\u60c5\u7684\u53d1\u751f\u554a\uff01\u5982\u679c\u4f60\u4e0d\u60f3\u8ba9\u8fd9\u4e2a\u5bf9\u8bdd\u6846\u51fa\u73b0\uff0c\u90a3\u5c31\u628a\u4f60\u7684\u9a71\u52a8\u63d0\u4ea4\u8ba4\u8bc1\u5c31\u597d\u3002\uff08\u5982\u679c\u662f\u51fa\u4e8e\u6d4b\u8bd5\u7684\u76ee\u7684\uff0c\u4f60\u53ef\u4ee5\u5c06\u4f60\u7684\u9a71\u52a8\u7528\u6d4b\u8bd5\u6839\u8bc1\u4e66\u7b7e\u540d\uff0c\u5e76\u4e14\u5728\u8fd0\u884c\u4f60\u7684\u5b89\u88c5\u7a0b\u5e8f\u4e4b\u524d\u5b89\u88c5\u8fd9\u4e2a\u6d4b\u8bd5\u6839\u8bc1\u4e66\u3002\u5f53\u7136\uff0c\u5b89\u88c5\u6d4b\u8bd5\u6839\u8bc1\u4e66\u4f1a\u8ba9\u684c\u9762\u4e0a\u5192\u51fa\u201c\u4ec5\u4f9b\u6d4b\u8bd5\u4f7f\u7528\u201d\u7684\u5b57\u6837\uff0c\u7528\u6765\u63d0\u9192\u4f60\u4f60\u7684\u673a\u5668\u76ee\u524d\u5141\u8bb8\u5b89\u88c5\u6d4b\u8bd5\u7b7e\u540d\u7684\u9a71\u52a8\u3002\uff09<\/p>\n<p>Driver writers, of course, find the certification process cumbersome and will do whatever they can to avoid it. Because, of course, if you submit your driver for certification, it might fail! This has led to varying degrees of shenanigans to trick the WHQL team into certifying a driver different from the one you intend to use. My favorite stunt was related to my by a colleague who was installing a video card driver whose setup program displayed a dialog that read, roughly, \u201cAfter clicking OK, do not touch your keyboard or mouse while we prepare your system.\u201d After you click OK, the setup program proceeds to move the mouse programmatically all over the screen, opening the Display control panel, clicking on the Advanced button, clicking through various other configuration dialogs, a flurry of activity for what seems like a half a minute. When faced with a setup program that does this, your natural reaction is to scream, \u201cAaaiiiiigh!\u201d<\/p>\n<p>\u800c\u9a71\u52a8\u7684\u7f16\u5199\u8005\u4eec\uff0c\u81ea\u7136\u800c\u7136\u5730\u53d1\u73b0\u8fd9\u4e2a\u8ba4\u8bc1\u8fc7\u7a0b\u7f13\u6162\u800c\u5197\u957f\uff0c\u7ee7\u800c\u60f3\u51fa\u5404\u79cd\u5404\u6837\u7684\u529e\u6cd5\u6765\u907f\u514d\u4e4b\u3002\u6bd5\u7adf\uff0c\u5982\u679c\u4f60\u628a\u81ea\u5df1\u7684\u9a71\u52a8\u63d0\u4ea4\u8ba4\u8bc1\u7684\u8bdd\uff0c\u8fd8\u662f\u6709\u901a\u4e0d\u8fc7\u7684\u53ef\u80fd\u6027\u7684\uff01\u8fd9\u79cd\u53ef\u80fd\u6027\u8ba9\u5f00\u53d1\u8005\u4eec\u60f3\u51fa\u4e86\u5404\u79cd\u7a00\u5947\u53e4\u602a\u7684\u95e8\u8def\uff0c\u8ba9WHQL\u56e2\u961f\u7ed9\u4f60\u6240\u63d0\u4ea4\u7684\u9a71\u52a8\u8fdb\u884c\u8ba4\u8bc1\uff0c\u4f46\u5b9e\u9645\u53d1\u5e03\u7684\u5219\u4e0d\u662f\u90a3\u4e00\u4e2a\u3002\u6211\u6240\u6700\u559c\u6b22\u7684\u4e00\u5219\u662f\u7531\u6211\u7684\u540c\u4e8b\u63d0\u4f9b\u7684\uff0c\u5f53\u4ed6\u5b89\u88c5\u67d0\u6b3e\u663e\u5361\u9a71\u52a8\u7684\u65f6\u5019\uff0c\u5b89\u88c5\u7a0b\u5e8f\u5f39\u51fa\u4e00\u4e2a\u5bf9\u8bdd\u6846\uff0c\u4e0a\u9762\u5927\u4f53\u4e0a\u5199\u7740\u8fd9\u4e9b\u5185\u5bb9\uff1a\u201c\u70b9\u51fbOK\u540e\uff0c\u5728\u6211\u4eec\u5e2e\u4f60\u4e3a\u7cfb\u7edf\u8fdb\u884c\u51c6\u5907\u914d\u7f6e\u65f6\uff0c\u8bf7\u4e0d\u8981\u64cd\u4f5c\u952e\u76d8\u6216\u9f20\u6807\u3002\u201d\u70b9\u51fbOK\u4e4b\u540e\uff0c\u5b89\u88c5\u7a0b\u5e8f\u5c31\u5f00\u59cb\u4ee5\u7a0b\u5e8f\u64cd\u4f5c\u4f60\u7684\u9f20\u6807\u6ee1\u5c4f\u5e55\u8dd1\uff0c\u6253\u5f00\u300e\u663e\u793a\u300f\u63a7\u5236\u9762\u677f\uff0c\u70b9\u51fb\u300e\u9ad8\u7ea7\u300f\u6309\u94ae\uff0c\u7136\u540e\u8fd9\u91cc\u90a3\u91cc\u70b9\u51fb\u5f88\u591a\u914d\u7f6e\u9879\uff0c\u4e00\u540c\u5fd9\u4e71\u4e0b\u6765\u5927\u6982\u8981\u82b1\u534a\u5206\u949f\u5de6\u53f3\u3002\u9762\u5bf9\u8fd9\u6837\u7684\u5b89\u88c5\u7a0b\u5e8f\uff0c\u4f60\u7684\u5185\u5fc3\u60f3\u5fc5\u662f\u5728\u5927\u558a\u300e\u554a\u554a\u554a\u554a\u554a\u300f\u7684\u5427\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u94fe\u63a5\uff1ahttps:\/\/devblogs.microsoft.com\/oldnewthing\/2005081 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-3171","post","type-post","status-publish","format-standard","hentry","category-tont_history"],"_links":{"self":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts\/3171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/comments?post=3171"}],"version-history":[{"count":0,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts\/3171\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/media?parent=3171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/categories?post=3171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/tags?post=3171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}