1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-03 20:55:51 +02:00

setx: add page (#6734)

This commit is contained in:
Sebastian Staudt 2021-10-04 21:46:26 +02:00 committed by GitHub
parent 0387d6143c
commit 88d446edc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

20
pages/windows/setx.md Normal file
View file

@ -0,0 +1,20 @@
# setx
> Sets persistent environment variables.
> More information: <https://docs.microsoft.com/windows-server/administration/windows-commands/setx>.
- Set an environment variable for the current user:
`setx {{variable}} {{value}}`
- Set an environment variable for the current machine:
`setx {{variable}} {{value}} /M`
- Set an environment variable for a user on a remote machine:
`setx /s {{hostname}} /u {{username}} /p {{password}} {{variable}} {{value}}`
- Set an environment variable from a registry key value:
`setx {{variable}} /k {{registry\key\path}}`