How to set environment variables in windows server 2008




















Create a free Team What is Teams? Learn more. Asked 11 years, 5 months ago. Active 11 years, 5 months ago. Viewed 12k times. Improve this question. Add a comment. Active Oldest Votes. Improve this answer. Sign up or log in Sign up using Google.

Sign up using Facebook. Which is unnecessary. AlexCode's solution is the correct one to get the old familiar dialog. Handy command, but this still requires elevated privileges and thus will not work for a normal user. OP's own answer is the correct one. Edgard Concha Edgard Concha 2 2 silver badges 7 7 bronze badges.

I don't think that works for the poster's question TimT TimT 1 1 silver badge 3 3 bronze badges. Wow, thanks for this command. I am now able to set env var to non interactive users. It's really helpfull for service accounts that need to run batches.

There are three ways 1 This runs the GUI editor for the user environment variables. For example rem Add a user environment variable named stackoverflow that's set to "test" setx stackoverflow test set st This should show all variables whose names start with the letters "st". However, if you start a new command prompt then set st will show that there are no variables starting with the letters "st" correction - I discovered that setx stackoverflow "" did not delete the variable.

Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.

Linked Related You can use environment variables in the values of other environment variables. It is then helpful to be able to see what environment variables are set already. This is how you do it:. To set persistent environment variables at the command line, we will use setx. Prior to that, it was part of the Windows Resource Kit. If you need the Windows Resource Kit, see Resources at the bottom of the page.

When setting environment variables through the registry, they will not recognized immediately. One option is to log out and back in again. One way is to get this message issued is to open the environment variables in the GUI, like we do in HowTo: Set an Environment Variable in Windows - GUI ; we do not need to change anything, just open the Environment Variables window where we can see the environment variables, then hit OK.



0コメント

  • 1000 / 1000