Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top