{"id":3225,"date":"2025-06-30T13:34:11","date_gmt":"2025-06-30T05:34:11","guid":{"rendered":"https:\/\/jir.idv.tw\/wordpress\/?p=3225"},"modified":"2025-06-30T13:34:11","modified_gmt":"2025-06-30T05:34:11","slug":"%e8%87%aa%e5%b7%b1%e8%a3%bd%e4%bd%9c%e7%9a%84-exe%e6%aa%94%e6%a1%88%ef%bc%8c%e6%9c%83%e8%a2%abwindows%e8%aa%a4%e5%88%a4%e7%95%b0%e5%b8%b8%e6%9c%89%e6%af%92%e6%96%87%e4%bb%b6%ef%bc%8c%e5%a6%82%e4%bd%95","status":"publish","type":"post","link":"https:\/\/jir.idv.tw\/wordpress\/?p=3225","title":{"rendered":"\u81ea\u5df1\u88fd\u4f5c\u7684.EXE\u6a94\u6848\uff0c\u6703\u88abWINDOWS\u8aa4\u5224\u7570\u5e38\u6709\u6bd2\u6587\u4ef6\uff0c\u5982\u4f55\u5efa\u7acb\u6578\u4f4d\u7c3d\u540d\u89e3\u6c7a"},"content":{"rendered":"<p>\u56e0\u70ba\u81ea\u5df1\u5de5\u4f5c\u4e0a\u7684\u9700\u6c42\uff0c\u5beb\u4e86\u4e00\u500bPYTHON\u7684\u5c0f\u7a0b\u5f0f\u5206\u4eab\u7d66\u540c\u4e8b\u5011\u4f7f\u7528\uff0c\u4f46\u662f\u524d\u5e74\u958b\u59cb\u88ab\u516c\u53f8\u7684WIN10\u96fb\u8166\uff0c\u8aa4\u5224\u662f\u6709\u554f\u984c\u7684\u6587\u4ef6\u4e0d\u80fd\u57f7\u884c\u3002<br \/>\n\u81ea\u5df1\u9664\u932f\u5f8c\uff0c\u8981\u518d\u6578\u4f4d\u7c3d\u540d\uff0c\u624d\u80fd\u9632\u6b62\u88ab\u8aa4\u5224\u662f\u6709\u554f\u984c\u7684\u57f7\u884c\u6a94\u3002<br \/>\n\u6240\u4ee5\u7d66\u81ea\u5df1\u4e00\u500b\u7d00\u9304\uff0c\u9632\u6b62\u4ee5\u5f8c\u9047\u5230\u985e\u4f3c\u7684\u4f4d\u984c\u53c8\u5728\u90a3\u908a\u82b1\u6642\u9593\u627e\u89e3\u6c7a\u65b9\u6848&#8230;\u518f<\/p>\n<p>***** 0) PYTHON\u7a0b\u5f0f\u8f49\u6210\u53ef\u57f7\u884c\u6a94(.PY to .exe)\u3002<br \/>\n<code>pyinstaller -F PYTHON_250630.py<\/code><\/p>\n<p>***** 1) \u5efa\u7acb\u9069\u5408\u4f7f\u7528\u7684\u7c3d\u540d\u6a94\uff0c\u6191\u8b49\u6709\u6548\u671f\u9810\u8a2d\u70ba\u4e00\u5e74\u3002<br \/>\n<code>c:<br \/>\ncd \"C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.26100.0\\x64\"<br \/>\nSet-ExecutionPolicy Bypass -Scope Process<br \/>\n$cert = New-SelfSignedCertificate `<br \/>\n  -DnsName \"\u4f7f\u7528\u8005\u7db2\u5740.com.tw\" `<br \/>\n  -CertStoreLocation \"cert:\\LocalMachine\\My\" `<br \/>\n  -Type CodeSigning `<br \/>\n  -Subject \"CN=\u4f7f\u7528\u8005\u540d\u7a31, E=\u4f7f\u7528\u8005\u4fe1\u7bb1\u5e33\u865f@\u4fe1\u7bb1\u7db2\u5740.com.tw\"<br \/>\n$pwd = ConvertTo-SecureString -String \"helloworld\" -Force -AsPlainText<br \/>\nExport-PfxCertificate -cert $cert -FilePath jircodecert250630.pfx -Password $pwd<\/code><\/p>\n<p>***** 2) \u5df2\u7522\u51fa\u7684EXE\u53ef\u57f7\u884c\u6a94\u548c\u5efa\u7acb\u7684\u7c3d\u540d\u6191\u8b49\u7d50\u5408\uff0c\u52a0\u5165\u6642\u9593\u6233\u7522\u51fa\u6709\u6578\u4f4d\u7c3d\u540d\u7684\u53ef\u57f7\u884c\u6a94\u3002<br \/>\n<code>c:<br \/>\ncd \"C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.26100.0\\x64\"<br \/>\nsigntool.exe sign \/f .\\jircodecert250630.pfx \/fd SHA256 \/p helloworld \/tr http:\/\/timestamp.sectigo.com \/td SHA256 .\\PYTHON_250630.exe<\/code><\/p>\n<p>\u5176\u5b83\u8aaa\u660e\u53c3\u8003\uff1a<br \/>\n<a href=\"https:\/\/developer.microsoft.com\/zh-tw\/windows\/downloads\/windows-sdk\/\" target=\"_blank\" rel=\"noopener\">https:\/\/developer.microsoft.com\/zh-tw\/windows\/downloads\/windows-sdk\/<\/a><br \/>\n<a href=\"https:\/\/stackoverflow.com\/questions\/78982240\/sap-s4-hana-login-via-scripting-no-longer-showing-sap-gui-logon-dialog\" target=\"_blank\" rel=\"noopener\">https:\/\/stackoverflow.com\/questions\/78982240\/sap-s4-hana-login-via-scripting-no-longer-showing-sap-gui-logon-dialog<\/a><br \/>\n<a href=\"https:\/\/ithelp.ithome.com.tw\/articles\/10281279\" target=\"_blank\" rel=\"noopener\">https:\/\/ithelp.ithome.com.tw\/articles\/10281279<\/a><br \/>\n<a href=\"https:\/\/github.com\/jiachengx\/ironmen\/blob\/main\/gencert.ps1\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/jiachengx\/ironmen\/blob\/main\/gencert.ps1<\/a><br \/>\n<a href=\"https:\/\/ooorito.com\/code-singing-with-signtool\/\" target=\"_blank\" rel=\"noopener\">https:\/\/ooorito.com\/code-singing-with-signtool\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u56e0\u70ba\u81ea\u5df1\u5de5\u4f5c\u4e0a\u7684\u9700\u6c42\uff0c\u5beb\u4e86\u4e00\u500bPYTHON\u7684\u5c0f\u7a0b\u5f0f\u5206\u4eab\u7d66\u540c\u4e8b\u5011\u4f7f\u7528\uff0c\u4f46\u662f\u524d\u5e74\u958b\u59cb\u88ab\u516c\u53f8\u7684WIN10\u96fb\u8166\uff0c\u8aa4\u5224\u662f\u6709\u554f\u984c\u7684\u6587\u4ef6\u4e0d\u80fd\u57f7\u884c\u3002 \u81ea\u5df1\u9664\u932f\u5f8c\uff0c\u8981\u518d\u6578\u4f4d\u7c3d\u540d\uff0c\u624d\u80fd\u9632\u6b62\u88ab\u8aa4\u5224\u662f\u6709\u554f\u984c\u7684\u57f7\u884c\u6a94\u3002 \u6240\u4ee5\u7d66\u81ea\u5df1\u4e00\u500b\u7d00\u9304\uff0c\u9632\u6b62\u4ee5\u5f8c\u9047\u5230\u985e\u4f3c\u7684\u4f4d\u984c\u53c8\u5728\u90a3\u908a\u82b1\u6642\u9593\u627e\u89e3\u6c7a\u65b9\u6848&#8230;\u518f ***** 0) PYTHON\u7a0b\u5f0f\u8f49\u6210\u53ef\u57f7\u884c\u6a94(.PY to .exe)\u3002 pyinstaller -F PYTHON_250630.py ***** 1) \u5efa\u7acb\u9069\u5408\u4f7f\u7528\u7684\u7c3d\u540d\u6a94\uff0c\u6191\u8b49\u6709\u6548\u671f\u9810\u8a2d\u70ba\u4e00\u5e74\u3002 c: cd &#8220;C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.26100.0\\x64&#8221; Set-ExecutionPolicy Bypass -Scope Process $cert = New-SelfSignedCertificate ` -DnsName &#8220;\u4f7f\u7528\u8005\u7db2\u5740.com.tw&#8221; ` -CertStoreLocation &#8220;cert:\\LocalMachine\\My&#8221; ` -Type CodeSigning ` -Subject &#8220;CN=\u4f7f\u7528\u8005\u540d\u7a31, E=&#8230; <a href=\"https:\/\/jir.idv.tw\/wordpress\/?p=3225\" class=\"readmore\">Read more (\u5b8c\u6574\u6587\u7ae0\u5167\u5bb9)<span class=\"screen-reader-text\">\u81ea\u5df1\u88fd\u4f5c\u7684.EXE\u6a94\u6848\uff0c\u6703\u88abWINDOWS\u8aa4\u5224\u7570\u5e38\u6709\u6bd2\u6587\u4ef6\uff0c\u5982\u4f55\u5efa\u7acb\u6578\u4f4d\u7c3d\u540d\u89e3\u6c7a<\/span><span class=\"fa fa-angle-double-right\" aria-hidden=\"true\"><\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-3225","post","type-post","status-publish","format-standard","hentry","category-4","content-layout-excerpt-thumb"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3225"}],"version-history":[{"count":1,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3225\/revisions"}],"predecessor-version":[{"id":3226,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3225\/revisions\/3226"}],"wp:attachment":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}