문제

I want to permanently change the value of the "Username" variable of Windows to fix a problem of my Windows 8 with the user profile folder name.

I've tried to set a new environment variable using SETX tool like this:

SETX /M Username "value"

...The new variable is generated, I can see it in the registry with the other variables, but is not overrided 'cause if I try to display the value of Username variable the it displays the old value.

Is it possibly to do what I want?

도움이 되었습니까?

해결책

CMD reads the system environment variables when it starts. To re-read those variables you need to restart CMD.

As for the variable %USERNAME%: that variable is automatically populated with the username of the currently logged-in user. You'd have to change the username to change the value of that variable. Don't tamper with it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top