从一个开发者的角度来使用 Windows
系统安装
重置 Windows
win + i
打开设置.
- 输入
重置此电脑
并按 Enter
确认.
- 点击
开始
, 按提示操作即可.
U盘安装
参考
- 微软官方下载
- 使用 Aria2 下载 Windows 镜像, 推荐
Windows 10/11 专业版
.
- 使用 Ventoy 来制作启动盘.
- 将U盘插入电脑, 开机进入BIOS选择U盘启动, 按提示操作即可.
ISO文件Hash校验(SHA256)
1
|
if ((Get-FileHash -Algorithm SHA256 -Path "PATH/TO/FILE").Hash -ne "HASH") { Write-Host "文件校验失败" } else { Write-Host "文件校验成功" }
|
Windows11 跳过网络验证
- Shift + F10 打开
CMD
窗口并输入 regedit
- 定位到
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE
- 新建DWORD(32位)值,名称为
BypassNRO
, 值设置为1
- 命令行输入
logoff
或 shutdown /r /t 0
系统设置
手动设置
安装脚本
在新安装的 Windows 系统上配置软件以便快速回到自己熟悉的开发环境, 特此记录以下脚本
软件安装统一使用 Scoop 来安装软件, 参考另一篇博客
安装 Scoop
打开自带的 Windows PowerShell 并执行以下命令
1
2
3
4
5
6
7
8
|
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
iwr -useb get.scoop.sh | iex
# 国内镜像
# iwr -useb https://gitee.com/glsnames/scoop-installer/raw/master/bin/install.ps1 | iex
# scoop config SCOOP_REPO 'https://gitee.com/glsnames/scoop-installer'
# https://gitee.com/scoop-bucket
# scoop bucket add extras https://gitee.com/scoop-bucket/extras.git
|
安装软件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
scoop install git
scoop bucket add dorado https://github.com/chawyehsu/dorado.git
scoop install dorado/clash-for-windows
# 手动配置clash
scoop config proxy 127.0.0.1:10808
scoop config SCOOP_REPO "https://github.com/ScoopInstaller/Scoop"
scoop update
scoop install dorado/powershell
scoop bucket add extras
scoop bucket add java
scoop bucket add nerd-fonts https://github.com/matthewjberger/scoop-nerd-fonts
scoop bucket add thesixonenine-scoop-bucket https://github.com/thesixonenine/thesixonenine-scoop-bucket
scoop bucket add versions https://github.com/ScoopInstaller/Versions
if ([System.Environment]::OSVersion.Version.Major -eq 10) {
Write-Host "Windows 10, 需要安装windows-terminal"
scoop install extras/windows-terminal
} else if ([System.Environment]::OSVersion.Version.Major -eq 11) {
Write-Host "Windows 11, 不需要安装windows-terminal"
}
scoop install oh-my-posh neofetch go gradle hugo-extended maven openssl proxychains python scrcpy
scoop install extras/powertoys extras/posh-git extras/git-aliases extras/scoop-completion extras/gpg4win extras/jetbrains-toolbox extras/filezilla extras/carnac extras/dismplusplus extras/everything extras/fiddler extras/geekuninstaller extras/jd-gui extras/openark extras/switchhosts extras/trafficmonitor extras/vscode extras/wireshark
Install-Module -Name DirColors -Proxy "127.0.0.1:10808"
|
Office 安装使用 office-tool-plus
或者 自定义部署配置文件部署安装
使用 office-tool-plus
部署
1
|
scoop install extras/windowsdesktop-runtime-lts extras/office-tool-plus
|
自定义部署配置文件部署
1
2
3
4
5
|
iwr "https://officecdn.microsoft.com/pr/wsus/setup.exe" -OutFile setup.exe
# move setup.ext into C:\
iwr "https://gist.githubusercontent.com/thesixonenine/173647918c69d9627eeb141a32d6ec57/raw/5ee850ca1fdacce442d94051fcb6f44598834093/Configuration.xml" -OutFile Configuration.xml
cd C:\
setup.exe /configure Configuration.xml
|
激活 Windows/Office 使用开源的MAS或者闭源的HEU
MAS激活
1
|
irm https://massgrave.dev/get | iex
|
配置同步