{"id":5305,"date":"2022-06-24T20:00:32","date_gmt":"2022-06-24T12:00:32","guid":{"rendered":"https:\/\/ixyzero.com\/blog\/?p=5305"},"modified":"2022-06-24T20:00:32","modified_gmt":"2022-06-24T12:00:32","slug":"windows-macos%e7%b3%bb%e7%bb%9f%e4%b8%8a%e5%a6%82%e4%bd%95%e8%bf%9b%e8%a1%8c%e8%bd%af%e4%bb%b6%e5%ae%89%e8%a3%85%e5%92%8c%e5%8d%b8%e8%bd%bd","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/5305.html","title":{"rendered":"Windows\/macOS\u7cfb\u7edf\u4e0a\u5982\u4f55\u8fdb\u884c\u8f6f\u4ef6\u5b89\u88c5\u548c\u5378\u8f7d"},"content":{"rendered":"\n<p>=Start=<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u7f18\u7531\uff1a<\/h4>\n\n\n\n<p>\u7b80\u5355\u8bb0\u5f55\u4e00\u4e0b\u5982\u4f55\u5728Windows\/macOS\u7cfb\u7edf\u4e0a\u8fdb\u884c\u8f6f\u4ef6\u7684\u5b89\u88c5\u548c\u5378\u8f7d\uff08\u4e3b\u8981\u662f\u60f3\u8bb0\u5f55\u547d\u4ee4\u884c\u4e0b\u7684\u5b89\u88c5\uff0c\u4e3a\u540e\u9762\u7684\u9759\u9ed8\u5b89\u88c5\/\u7f16\u5199\u5c0f\u767d\u4e5f\u5bb9\u6613\u7406\u89e3\u7684\u5b89\u88c5\u6559\u7a0b\/\u5de5\u5177\u505a\u51c6\u5907\uff0c\u53ef\u89c6\u5316\u7684\u70b9\u51fb\u4ea4\u4e92\u5f0f\u5b89\u88c5\u4e0d\u662f\u91cd\u70b9\uff0c\u4e00\u7b14\u5e26\u8fc7\u5373\u53ef\uff09\uff0c\u65b9\u4fbf\u540e\u9762\u53c2\u8003\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u6b63\u6587\uff1a<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">\u53c2\u8003\u89e3\u7b54\uff1a<\/h5>\n\n\n\n<h1 class=\"wp-block-heading\">\u5b89\u88c5<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">Windows-\u56fe\u5f62\u5316\u754c\u9762<\/h2>\n\n\n\n<p>\u9f20\u6807\u53cc\u51fb\uff08\u7136\u540e\u8ddf\u7740\u6307\u793a\u64cd\u4f5c\u5373\u53ef\uff09<br><strong>\u9f20\u6807\u53f3\u952e-\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c(A)<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Windows-\u547d\u4ee4\u884c\u7ec8\u7aef<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">setup.exe<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5982\u679c\u8def\u5f84\u4e0d\u592a\u597d\u8f93\u5165\u7684\u8bdd\uff0c\u53ef\u4ee5\u5148\u6253\u5f00\u4e00\u4e2aCMD\u7ec8\u7aef\uff0c\u7136\u540e\u7528\u9f20\u6807\u628a\u8f6f\u4ef6\u62d6\u52a8\u5230\u7ec8\u7aef\u4e0a\u5c31\u4f1a\u6709\u8def\u5f84\u4e86\n> \"C:\\SomeFolder\\setup.exe\"\n> \"C:\\SomeFolder\\setup.exe\" \/VERYSILENT \/SUPPRESSMSGBOXES \/NORESTART<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">setup.msi<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>> msiexec \/i C:\\setup.msi \/qn\n> msiexec \/i C:\\setup.msi \/qn \/norestart<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u9009\u9879\u8bf4\u660e<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># msiexec\n\n\/quiet, \/q, qn\tFully silent mode (\u9759\u9ed8\u5b89\u88c5)\n\/passive\tUnattended mode, shows progress bar only.\n\/norestart\tDo not restart the system after the installation\n\/forcerestart\tRestart the system after installation is complete\n\/log, \/l\tEnable Logging\n\n\n# setup.exe\n\n\/SILENT\tRuns the installer in silent mode (The progress window is displayed)\n\/VERYSILENT\t(\u9759\u9ed8\u5b89\u88c5)Very silent mode. No windows are displayed.\n\/SUPPRESSMSGBOXES\tSuppress message boxes. Only has an effect when combined with \u2018\/SILENT\u2019 and \u2018\/VERYSILENT\u2019.\n\/NOCANCEL\tDisables cancelling the installation process.\n\/NORESTART\tPrevents installer from restarting the system even if it\u2019s necessary.\n\/DIR=\"x:\\dirname\"\tOverrides the default install directory.\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">macOS-\u56fe\u5f62\u5316\u754c\u9762<\/h2>\n\n\n\n<p>\u9f20\u6807\u53cc\u51fb\uff08\u7136\u540e\u8ddf\u7740\u6307\u793a\u64cd\u4f5c\u5373\u53ef\uff09<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">macOS-\u547d\u4ee4\u884c\u7ec8\u7aef<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo installer -pkg \/path\/to\/filename.pkg -target \/<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u5378\u8f7d<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">Windows-\u56fe\u5f62\u5316\u754c\u9762<\/h2>\n\n\n\n<p>Windows\u63a7\u5236\u9762\u677f &#8211; \u5378\u8f7d\u7a0b\u5e8f &#8211; \u9009\u5b9a\u5e94\u7528\u53f3\u952e\u5378\u8f7d #Windows7<br>Windows\u8bbe\u7f6e &#8211; \u5e94\u7528\u548c\u529f\u80fd &#8211; \u9009\u5b9a\u5e94\u7528\u8fdb\u884c\u5378\u8f7d #Windows10<br>\u6709\u5f88\u591a\u5e94\u7528\u90fd\u6709\u6b64\u529f\u80fd\uff0c\u5728\u6b64\u4e0d\u4e00\u4e00\u5217\u4e3e\u4e86<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Windows-\u547d\u4ee4\u884c\u7ec8\u7aef<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Silently uninstall the msi package:\n> msiexec \/x C:\\setup.msi \/qn\n\n\/\/ Silently uninstall the msi package by the product code:\n> msiexec \/x {XXXXXXXX-9215-4780-AAC6-01FD101DC931} \/qn\n\n\/\/ wmi\n> wmic product where name=\"my_product_name\" call uninstall\n\n\/\/ powershell\npowershell> (Get-WmiObject -Query \"SELECT * FROM Win32_Product WHERE Name like '%Partial Name%'\").uninstall()<\/code><\/pre>\n\n\n\n<p>HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall<br>HKLM\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\<\/p>\n\n\n\n<p><strong>Every program that properly installs itself according to Microsoft&#8217;s guidelines makes a registry entry<\/strong> in HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall. Usually, the key for the program will be its GUID, or else the name of the program. <strong>Within that key will be an entry called UninstallString. This contains the command to execute to uninstall the program.<\/strong><\/p>\n\n\n\n<p>If you already know ahead of time what you will be uninstalling, it should be easy enough to just put that in your batch file. It gets tricky when you try to automate that process though. You can use the reg command to get data from the registry, but it returns a lot of text around the actual value of a given key, making it hard to use. You may want to experiment with using VBscript or PowerShell, as they have better options for getting data from the registry into a variable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">macOS-\u56fe\u5f62\u5316\u754c\u9762<\/h2>\n\n\n\n<p>\u76f4\u63a5\u5c06app\u62d6\u5230\u5e9f\u7eb8\u7bd3\u91cc\u5c31\u884c<br>\u5f88\u591amacOS\u5e94\u7528\uff0c\u6bd4\u5982CleanMyMac<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">macOS-\u547d\u4ee4\u884c\u7ec8\u7aef<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>\u7b80\u5355\u7684\u662f\u76f4\u63a5\u5220\u9664\u7279\u5b9a\u7684 .app \u76ee\u5f55<\/li><li>\u590d\u6742\u7684\u53ef\u80fd\u8fd8\u6709\u4e00\u4e9b\u914d\u7f6e\/\u6587\u4ef6\u5b58\u653e\u5728\u4e86\u5176\u5b83\u76ee\u5f55\u9700\u8981\u4e00\u8d77\u5220\u9664\u624d\u80fd\u5b8c\u6574\u5730\u8fdb\u884c\u5378\u8f7d<\/li><li>\u5bf9\u4e8e\u6709\u4fdd\u6d3b\u529f\u80fd\u7684\u8f6f\u4ef6\u6765\u8bf4\uff0c\u9700\u8981\u5148\u6740\u6389\u76f8\u5173\u8fdb\u7a0b\u7136\u540e\u540c\u6b65\u5220\u9664\u76f8\u5173\u76ee\u5f55\uff0c\u624d\u80fd\u5b8c\u6210\u5378\u8f7d<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>mdfind\nlsof<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">\u53c2\u8003\u94fe\u63a5\uff1a<\/h5>\n\n\n\n<p>Running .exe in command prompt<br><a href=\"https:\/\/superuser.com\/questions\/876933\/running-exe-in-command-prompt\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/superuser.com\/questions\/876933\/running-exe-in-command-prompt<\/a><\/p>\n\n\n\n<p>The Inno Setup install parameters that are required for silent installation.<br><a href=\"https:\/\/www.silentinstall.org\/inno_setup\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.silentinstall.org\/inno_setup\/<\/a><\/p>\n\n\n\n<p>Unattended Installation for Windows<br><a href=\"http:\/\/www.elliecomputing.com\/en\/OnlineDoc\/ecmerge_EN\/111706292.asp\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/www.elliecomputing.com\/en\/OnlineDoc\/ecmerge_EN\/111706292.asp<\/a><\/p>\n\n\n\n<p>Silent installation of a MSI package<br><a href=\"https:\/\/stackoverflow.com\/questions\/8560166\/silent-installation-of-a-msi-package\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/stackoverflow.com\/questions\/8560166\/silent-installation-of-a-msi-package<\/a><\/p>\n\n\n\n<p>The Silent Install options for the Windows installer (msiexec)<br><a href=\"https:\/\/www.silentinstall.org\/msiexec\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.silentinstall.org\/msiexec\/<\/a><\/p>\n\n\n\n<p>Silent install parameters for Windows applications<br><a href=\"https:\/\/www.novatec-gmbh.de\/en\/blog\/windows-silent-install-parameters\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.novatec-gmbh.de\/en\/blog\/windows-silent-install-parameters\/<\/a><\/p>\n\n\n\n<p>How to Uninstall .exe silently in c++<br><a href=\"https:\/\/stackoverflow.com\/questions\/60994542\/how-to-uninstall-exe-silently-in-c\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/stackoverflow.com\/questions\/60994542\/how-to-uninstall-exe-silently-in-c<\/a><\/p>\n\n\n\n<p>SOLVED: Command Line To Uninstall Software EXE\u2019s or .MSI\u2019s<br><a href=\"https:\/\/www.urtech.ca\/2019\/09\/solved-command-line-to-uninstall-software-exes-or-msis\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.urtech.ca\/2019\/09\/solved-command-line-to-uninstall-software-exes-or-msis\/<\/a><\/p>\n\n\n\n<p>Uninstalling programs silently via CMD<br><a href=\"https:\/\/superuser.com\/questions\/234104\/uninstalling-programs-silently-via-cmd\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/superuser.com\/questions\/234104\/uninstalling-programs-silently-via-cmd<\/a><\/p>\n\n\n\n<p>Microsoft Standard Installer Command-Line Options<br><a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/msi\/standard-installer-command-line-options\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/msi\/standard-installer-command-line-options<\/a><\/p>\n\n\n\n<p>How to Completely Remove Apps &amp; Software in Mac OS X by Manual Terminal Uninstall<br><a href=\"https:\/\/osxdaily.com\/2014\/07\/31\/manual-complete-app-removal-mac-os-x-terminal\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/osxdaily.com\/2014\/07\/31\/manual-complete-app-removal-mac-os-x-terminal\/<\/a><\/p>\n\n\n\n<p>How to uninstall apps on your Mac<br><a href=\"https:\/\/support.apple.com\/en-us\/HT202235\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/support.apple.com\/en-us\/HT202235<\/a><\/p>\n\n\n\n<p>How to uninstall programs on a Mac<br><a href=\"https:\/\/macpaw.com\/how-to\/uninstall-apps-on-mac-os-x\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/macpaw.com\/how-to\/uninstall-apps-on-mac-os-x<\/a><\/p>\n\n\n\n<p>Here\u2019s how to delete programs on Mac<br><a href=\"https:\/\/cleanmymac.com\/blog\/uninstall-programs-mac\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/cleanmymac.com\/blog\/uninstall-programs-mac<\/a><\/p>\n\n\n\n<p>=END=<\/p>\n","protected":false},"excerpt":{"rendered":"<p>=Start= \u7f18\u7531\uff1a \u7b80\u5355\u8bb0\u5f55\u4e00\u4e0b\u5982\u4f55\u5728Windows\/macOS\u7cfb\u7edf\u4e0a\u8fdb\u884c\u8f6f\u4ef6\u7684\u5b89\u88c5\u548c\u5378\u8f7d\uff08\u4e3b\u8981\u662f\u60f3\u8bb0\u5f55\u547d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,560,12,20],"tags":[1843,1840,1841,1844,1842,1829],"class_list":["post-5305","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","category-mac","category-tools","category-windows","tag-installer","tag-msiexec","tag-setup-exe","tag-uninstall","tag-verysilent","tag-wmic"],"views":2493,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/5305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=5305"}],"version-history":[{"count":1,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/5305\/revisions"}],"predecessor-version":[{"id":5306,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/5305\/revisions\/5306"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=5305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=5305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=5305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}