setx
Set persistent environment variables. More information: https://learn.microsoft.com/windows-server/administration/windows-commands/setx.
- Set an environment variable for the current user:
setx
- Set an environment variable for the current machine:
setx /M
- Set an environment variable for a user on a remote machine:
setx /s /u /p
- Set an environment variable from a registry key value:
setx /k
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
