Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Win11 跨版本设置前的准备 #34

Open
maboloshi opened this issue Oct 15, 2024 · 0 comments
Open

Win11 跨版本设置前的准备 #34

maboloshi opened this issue Oct 15, 2024 · 0 comments

Comments

@maboloshi
Copy link
Owner

maboloshi commented Oct 15, 2024

重新设置环境变量并重置scoop

## 设置系统的`临时文件`的环境变量(使用管理员模式)
[System.Environment]::SetEnvironmentVariable('TEMP', 'D:\TEMP', 'Machine')
[System.Environment]::SetEnvironmentVariable('TMP', 'D:\TEMP', 'Machine')
# 设置用户的`临时文件`的环境变量
[System.Environment]::SetEnvironmentVariable('TEMP', 'D:\TEMP', 'User')
[System.Environment]::SetEnvironmentVariable('TMP', 'D:\TEMP', 'User')
$env:TEMP = 'D:\TEMP'
$env:TMP = 'D:\TEMP'

# 修改用户`SCOOP`环境变量及当前环境变量
$env:SCOOP = 'D:\APP\Scoop'
$env:PATH += ";$env:SCOOP\shims"
[System.Environment]::SetEnvironmentVariable('SCOOP', "$env:SCOOP", 'User')
[System.Environment]::SetEnvironmentVariable('PATH', "$env:PATH", 'User')

# 设置`SCOOP`代理
scoop config proxy 127.0.0.1:7890

# 关闭aria2-warning
scoop config aria2-warning-enabled false

# 重置 SCOOP
scoop reset *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant