setx: add page (#6734)
This commit is contained in:
20
pages/windows/setx.md
Normal file
20
pages/windows/setx.md
Normal 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}}`
|
Reference in New Issue
Block a user