226 lines
13 KiB
HTML
Raw Normal View History

2025-01-02 21:19:48 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<title>Dich&#x27;blog</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="robots" content="noodp"/>
<link rel="stylesheet" href="https://blog.dich.bid/style.css">
<link rel="stylesheet" href="https://blog.dich.bid/color/blue.css">
<link rel="stylesheet" href="https://blog.dich.bid/color/background_dark.css">
<link rel="stylesheet" href="https://blog.dich.bid/font-hack-subset.css">
<meta name="description" content="">
<meta property="og:description" content="">
<meta property="og:title" content="Dich'blog">
<meta property="og:type" content="article">
<meta property="og:url" content="https://blog.dich.bid/windows-some-setting/">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:description" content="">
<meta name="twitter:title" content="Dich'blog">
<meta property="twitter:domain" content="blog.dich.bid">
<meta property="twitter:url" content="https://blog.dich.bid/windows-some-setting/">
<link rel="alternate" type="application/atom+xml" title="Dich&#x27;blog Atom Feed" href="https://blog.dich.bid/atom.xml" />
</head>
<body class="">
<div class="container">
<header class="header">
<div class="header__inner">
<div class="header__logo">
<a href="https://blog.dich.bid" style="text-decoration: none;">
<div class="logo">
Dich&#x27;blog
</div>
</a>
</div>
</div>
<nav class="menu">
<ul class="menu__inner">
<li class="active"><a href="https://blog.dich.bid">blog</a></li>
<li><a href="https://blog.dich.bid/tags">tags</a></li>
<li><a href="https://blog.dich.bid/archive">archive</a></li>
<li><a href="https://blog.dich.bid/about">about me</a></li>
<li><a href="https://blog.dich.bid/links">links</a></li>
<li><a href="https://blog.dich.bid/search">search</a></li>
<li><a href="https://github.com/Dichgrem" target="_blank" rel="noopener noreferrer">github</a></li>
</ul>
</nav>
</header>
<div class="content">
<div class="post">
<h1 class="post-title"><a href="https://blog.dich.bid/windows-some-setting/">乱七八糟:Windows常用脚本</a></h1>
<div class="post-meta-inline">
<span class="post-date">
2023-08-26
</span>
</div>
<span class="post-tags-inline">
:: tags:&nbsp;
<a class="post-tag" href="https://blog.dich.bid/tags/windows/">#Windows</a>&nbsp;
<a class="post-tag" href="https://blog.dich.bid/tags/luan-qi-ba-zao/">#乱七八糟</a></span>
<div class="post-content">
2025-01-08 20:45:00 +08:00
<p>前言 Windows操作系统作为全球最为普及的桌面操作系统之一其用户界面的设计非常经典但存在许多不足之处本篇记录一些常用脚本。</p>
<span id="continue-reading"></span><h2 id="windows11tiao-guo-lian-wang-ji-huo-shi-yong-ben-di-zhang-hao"><strong>Windows11跳过联网激活 &amp; 使用本地账号</strong></h2>
<p>开机之前先断网然后输入Shift+F10会弹出命令行界面并输入
<code>oobe\BypassNRO.cmd</code>
回车之后会重启,之后就可以跳过联网了,选择
<code>I don't have internet</code>
即可。</p>
<h2 id="ji-huo-windows">激活windows</h2>
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>irm https://get.activated.win | iex
2025-01-02 21:19:48 +08:00
</span></code></pre>
<h2 id="win11guan-bi-zi-dong-geng-xin"><strong>Win11关闭自动更新</strong></h2>
2025-01-08 20:45:00 +08:00
<p>1.按Win+I打开Windows设置页面。</p>
<p>2.单击“更新和安全”&gt;“Windows更新”然后在右侧详情页中选择“暂停更新7天”选项即可在此后7天内关闭Windows更新。</p>
<p>3.使用脚本彻底关闭更新</p>
2025-01-02 21:19:48 +08:00
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>::Windows auomatic updates
</span><span>reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU /v AutoInstallMinorUpdates /t REG_DWORD /d 1 /f
</span><span>reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU /v NoAutoUpdate /t REG_DWORD /d 1 /f
</span><span>reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU /v AUOptions /t REG_DWORD /d 4 /f
</span><span>reg add &quot;HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update&quot; /v AUOptions /t REG_DWORD /d 4 /f
</span><span>reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /v DisableWindowsUpdateAccess /t REG_DWORD /d 0 /f
</span><span>reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /v ElevateNonAdmins /t REG_DWORD /d 0 /f
</span><span>reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoWindowsUpdate /t REG_DWORD /d 1 /f
</span><span>reg add &quot;HKLM\SYSTEM\Internet Communication Management\Internet Communication&quot; /v DisableWindowsUpdateAccess /t REG_DWORD /d 0 /f
</span><span>reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate /v DisableWindowsUpdateAccess /t REG_DWORD /d 0 /f
</span><span>sc stop wuauserv
</span><span>sc config wuauserv start=disabled
</span><span>sc stop WaaSMedicSvc
</span><span>sc config WaaSMedicSvc start=disabled
</span><span>reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\InstallService\State /v AutoUpdateLastSuccessTime /t REG_SZ /d &quot;2100-01-01T00:00:00+08:00&quot; /f
</span><span>reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v PauseFeatureUpdatesStartTime /t REG_SZ /d &quot;2100-01-01T00:00:00Z&quot; /f
</span><span>reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v PauseQualityUpdatesStartTime /t REG_SZ /d &quot;2100-01-01T00:00:00Z&quot; /f
</span><span>reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v PauseUpdatesExpiryTime /t REG_SZ /d &quot;2100-01-01T00:00:00Z&quot; /f
</span><span>reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v PauseFeatureUpdatesEndTime /t REG_SZ /d &quot;2100-01-01T00:00:00Z&quot; /f
</span><span>reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v PauseQualityUpdatesEndTime /t REG_SZ /d &quot;2100-01-01T00:00:00Z&quot; /f
</span></code></pre>
<p>将以上命令保存为.bat文件运行即可。</p>
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>::Windows auomatic updates
</span><span>reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU /v AutoInstallMinorUpdates /t REG_DWORD /d 0 /f
</span><span>reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU /v NoAutoUpdate /t REG_DWORD /d 0 /f
</span><span>reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU /v AUOptions /t REG_DWORD /d 0 /f
</span><span>reg add &quot;HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update&quot; /v AUOptions /t REG_DWORD /d 4 /f
</span><span>reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /v DisableWindowsUpdateAccess /t REG_DWORD /d 1 /f
</span><span>reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /v ElevateNonAdmins /t REG_DWORD /d 1 /f
</span><span>reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoWindowsUpdate /t REG_DWORD /d 0 /f
</span><span>reg add &quot;HKLM\SYSTEM\Internet Communication Management\Internet Communication&quot; /v DisableWindowsUpdateAccess /t REG_DWORD /d 1 /f
</span><span>reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate /v DisableWindowsUpdateAccess /t REG_DWORD /d 1 /f
</span><span>sc config wuauserv start=auto
</span><span>sc start wuauserv
</span><span>sc config WaaSMedicSvc start=auto
</span><span>sc start WaaSMedicSvc
</span><span>reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\InstallService\State /v AutoUpdateLastSuccessTime /t REG_SZ /d &quot;2000-01-01T00:00:00+08:00&quot; /f
</span><span>reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v PauseFeatureUpdatesStartTime /t REG_SZ /d &quot;2000-01-01T00:00:00Z&quot; /f
</span><span>reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v PauseQualityUpdatesStartTime /t REG_SZ /d &quot;2000-01-01T00:00:00Z&quot; /f
</span><span>reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v PauseUpdatesExpiryTime /t REG_SZ /d &quot;2000-01-01T00:00:00Z&quot; /f
</span><span>reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v PauseFeatureUpdatesEndTime /t REG_SZ /d &quot;2000-01-01T00:00:00Z&quot; /f
</span><span>reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v PauseQualityUpdatesEndTime /t REG_SZ /d &quot;2000-01-01T00:00:00Z&quot; /f
</span><span>pause
</span></code></pre>
<p>以上为恢复更新的脚本。</p>
2025-01-08 20:45:00 +08:00
<h2 id="shi-yong-cmdhui-fu-wan-zheng-you-jian-cai-dan"><strong>使用CMD恢复完整右键菜单</strong></h2>
<p>Win11的<code>显示更多选项</code>怎么设置才能将其关闭,并恢复成Win10的状态呢系统内置的命令提示符CMD可以帮助我们完成这一任务另外请注意此操作仅适用于CMD并不适用于Windows PowerShell。</p>
<p><strong>步骤1.</strong><strong>Win+S</strong>打开搜索框,输入<strong>cmd</strong>并以管理员身份运行命令提示符。</p>
<p><strong>步骤2.</strong> 输入以下命令并按<strong>Enter</strong>键执行。</p>
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>reg add HKCU\Software\Classes\CLSID{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32 /ve /d “” /f
2025-01-02 21:19:48 +08:00
</span></code></pre>
2025-01-08 20:45:00 +08:00
<p>或者</p>
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>reg add &quot;HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32&quot; /f /ve
</span><span>taskkill /f /im explorer.exe
</span><span>start explorer.exe
</span></code></pre>
<p>注意如果您想要重新打开Win11新样式的右键菜单的话以同样的方式在命令提示符中执行此命令</p>
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>reg delete &quot;HKCU\Software\Classes\CLSID{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}&quot; /f
2025-01-02 21:19:48 +08:00
</span></code></pre>
2025-01-08 20:45:00 +08:00
<h2 id="win11tian-jia-kai-ji-zi-qi-dong-xiang-fang-fa"><strong>Win11添加开机自启动项方法</strong></h2>
<p>选择“开始”按钮 ,然后滚动查找你希望在启动时运行的应用。</p>
<p>右键单击该应用,选择“更多”,然后选择“打开文件位置”。此操作会打开保存应用快捷方式的位置。如果没有“打开文件位置”选项,这意味着该应用无法在启动时运行。</p>
<p>文件位置打开后按win+ R键入“shell:startup”然后选择“确定”。这将打开“启动”文件夹。</p>
<p>将该应用的快捷方式从文件位置复制并粘贴到“启动”文件夹中,即添加启动项成功。</p>
2025-01-02 21:19:48 +08:00
</div>
<div class="pagination">
<div class="pagination__title">
<span class="pagination__title-h">Thanks for reading! Read other posts?</span>
<hr />
</div>
<div class="pagination__buttons">
<span class="button previous">
2025-01-21 19:11:02 +08:00
<a href="https://blog.dich.bid/about-accurate-pronunciation/">
2025-01-02 21:19:48 +08:00
<span class="button__icon"></span>&nbsp;
<span class="button__text">乱七八糟:常见发音错误术语集合</span>
</a>
</span>
<span class="button next">
2025-01-21 19:11:02 +08:00
<a href="https://blog.dich.bid/about-mechrev-keyboard/">
2025-01-02 21:19:48 +08:00
<span class="button__text">乱七八糟:机械革命键盘失灵拯救记</span>&nbsp;
<span class="button__icon"></span>
</a>
</span>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="footer__inner">
<div class="copyright">
<span>©
2025
Dichgrem</span>
<span class="copyright-theme">
<span class="copyright-theme-sep">:: </span>
Theme: <a href="https://github.com/pawroman/zola-theme-terminimal/">Terminimal</a> by pawroman
</span>
</div>
</div>
</footer>
</div>
</body>
</html>