{"id":1816,"date":"2021-12-02T17:20:13","date_gmt":"2021-12-02T09:20:13","guid":{"rendered":"https:\/\/gnonstop.linkpc.net\/wp\/?p=1816"},"modified":"2021-12-03T21:04:07","modified_gmt":"2021-12-03T13:04:07","slug":"%e7%94%a8-reg-%e6%aa%94%e6%a1%88%e4%be%86%e6%96%b0%e5%a2%9e%e3%80%81%e5%88%aa%e9%99%a4%e3%80%81%e4%bf%ae%e6%94%b9-windows-registry","status":"publish","type":"post","link":"https:\/\/guerilla.ddns.net\/wp\/?p=1816","title":{"rendered":"\u7528 .reg \u6a94\u6848\u4f86\u65b0\u589e\u3001\u522a\u9664\u3001\u4fee\u6539 Windows registry"},"content":{"rendered":"<h2>.reg \u7684\u57fa\u672c\u683c\u5f0f:<\/h2>\n<pre>RegistryEditorVersion\r\nBlank line (\u7a7a\u884c)\r\n[RegistryPath1]\r\n\"DataItemName1\"=\"DataType1:DataValue1\"\r\n\"DataItemName2\"=\"DataType2:DataValue2\"\r\nBlank line (\u7a7a\u884c)\r\n[RegistryPath2]\r\n\"DataItemName3\"=\"DataType3:DataValue3\"<\/pre>\n<h3>\u8aaa\u660e<\/h3>\n<p><span style=\"color: red;\">RegistryEditorVersion<\/span>:<\/p>\n<ul>\n<li>&#8220;<strong>Windows Registry Editor Version 5.00<\/strong>&#8220;: Windows Server 2003, and Windows 2000\/XP\/7\/10<\/li>\n<li>&#8220;<strong>REGEDIT4<\/strong>&#8220;: Windows 98 and Windows NT 4.0, Windows 2000, Windows XP, and Windows Server 2003, Windows 7.<\/li>\n<\/ul>\n<p>ps: \u53ef\u4ee5\u5229\u7528 regedit.exe \u532f\u51fa .reg \u89c0\u5bdf RegistryEditorVersion \u61c9\u8a72\u586b\u751a\u9ebc<\/p>\n<p><span style=\"color: red;\">RegistryPathx<\/span> \u662f\u7528 [ ] \u6846\u8d77\u4f86\u7684\u5b50\u9375\u5206\u652f (the path of the subkey), \u4f8b\u5982:<br \/>\n[HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\System]<\/p>\n<p><span style=\"color: red;\">DataItemNamex<\/span> \u662f\u8981\u532f\u5165\u7684\u8cc7\u6599\u7684\u540d\u7a31<\/p>\n<p><span style=\"color: red;\">DataTypex<\/span> \u662f\u8cc7\u6599\u985e\u5225 (\u76f4\u63a5\u8ddf\u5728\u5f15\u865f\u4e4b\u5f8c)<\/p>\n<table class=\"sbody-table table\">\n<tbody>\n<tr class=\"sbody-tr\">\n<th class=\"sbody-th\"><span class=\"text-base\">Data Type<\/span><\/th>\n<th class=\"sbody-th\"><span class=\"text-base\">DataType in .reg<\/span><\/th>\n<\/tr>\n<tr class=\"sbody-tr\">\n<td class=\"sbody-td\">REG_BINARY<\/td>\n<td class=\"sbody-td\">hexadecimal<\/td>\n<\/tr>\n<tr class=\"sbody-tr\">\n<td class=\"sbody-td\">REG_DWORD<\/td>\n<td class=\"sbody-td\">dword<\/td>\n<\/tr>\n<tr class=\"sbody-tr\">\n<td class=\"sbody-td\">REG_EXPAND_SZ<\/td>\n<td class=\"sbody-td\">hexadecimal(2)<\/td>\n<\/tr>\n<tr class=\"sbody-tr\">\n<td class=\"sbody-td\">REG_MULTI_SZ<\/td>\n<td class=\"sbody-td\">hexadecimal(7)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color: red;\">DataValuex<\/span> \u7dca\u8ddf\u5728\u5192\u865f (or the equal sign with REG_SZ) \u4e4b\u5f8c, \u4e26\u4e14\u5fc5\u9808\u586b\u5165\u9069\u7576\u7684\u683c\u5f0f\uff08\u4f8b\u5982: \u5b57\u4e32\u6216\u5341\u516d\u9032\u5236\u6578\u503c). \u4e8c\u9032\u4f4d\u7684\u8cc7\u6599\u5247\u662f\u4f7f\u7528\u5341\u516d\u9032\u5236\u6578\u503c\u3002<\/p>\n<h2>\u65b0\u589e subkey, \u6216\u662f\u65b0\u589e\u3001\u4fee\u6539 registry values<\/h2>\n<p>\u53ef\u4ee5\u7528 regedit \u9032\u5165 &#8220;\u767b\u9304\u7de8\u8f2f\u7a0b\u5f0f&#8221;\uff0c\u5728\u5de6\u908a\u7684\u7a97\u683c\u627e\u5230\u4f60\u8981\u7684\u4f4d\u7f6e\u4e4b\u5f8c\uff0c\u6309\u6ed1\u9f20\u53f3\u9375\u9078\u300c\u532f\u51fa\u300d\uff0c\u5c31\u6709\u4e00\u500b\u5b8c\u7f8e\u7684\u6a19\u6e96 reg \u6a94\u6848\u4e86\u3002<\/p>\n<p>\u7136\u5f8c\u518d\u7528\u6587\u5b57\u7de8\u8f2f\u5668\u7de8\u8f2f\u9019\u500b reg \u6a94\u6848\uff0c\u7de8\u8f2f\u5b8c\u7562\u5f8c\uff0c\u5728\u9019\u500b reg \u6a94\u6848\u4e0a\u6309\u6ed1\u9f20\u53f3\u9375\u9078\u300c\u5408\u4f75\u300d\uff0c\u5c31\u80fd\u9054\u5230\u6240\u8981\u7684\u65b0\u589e\u6216\u4fee\u6539\u7684\u529f\u80fd\u3002<\/p>\n<h2>\u522a\u9664 registry keys and values<\/h2>\n<p>\u8981\u522a\u9664\u7684\u8a71\uff0c\u8acb\u5728 .reg \u6587\u4ef6\u4e2d\u7684 RegistryPath \u524d\u9762\u653e\u7f6e\u4e00\u500b\u6e1b\u865f (-)\u3002<\/p>\n<p>\u4f8b1\uff1a<br \/>\n<b>[-HKEY_LOCAL_MACHINE\\Software\\Test]<\/b><\/p>\n<p>\u4f8b2\uff1a<br \/>\n[HKEY_LOCAL_MACHINE\\Software\\Test]<br \/>\n<b>&#8220;TestValue&#8221;=-<\/b><\/p>\n<p>ref:<br \/>\n\u2022 <a href=\"https:\/\/support.microsoft.com\/en-us\/kb\/310516\" target=\"_blank\" rel=\"noopener\"><i>How to add, modify, or delete registry subkeys and values by using a .reg file<\/i><\/a><br \/>\n\u2022 <a href=\"https:\/\/wmos.info\/archives\/1895\" target=\"_blank\" rel=\"noopener\"><i>Windows Registry \u7cfb\u7d71\u767b\u9304\u6a94\u8a73\u89e3<\/i><\/a><\/p>\n<p>#windows #reg<\/p>\n","protected":false},"excerpt":{"rendered":"<p>.reg \u7684\u57fa\u672c\u683c\u5f0f: RegistryEditorVersion Blank line (\u7a7a\u884c) [Regi [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[179],"tags":[36],"class_list":["post-1816","post","type-post","status-publish","format-standard","hentry","category-infotech","tag-windows"],"_links":{"self":[{"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1816","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1816"}],"version-history":[{"count":8,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1816\/revisions"}],"predecessor-version":[{"id":1824,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1816\/revisions\/1824"}],"wp:attachment":[{"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1816"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1816"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}