I am stuck on a issue. I am trying to set user-environment variables using PowerShell:
[Environment]::SetEnvironmentVariable($key,$value,'User')
But when I look into the registry I can see the new entry is of type REG_SZ
.
I would like it to be of type REG_EXPAND_SZ
.
Can someone help me with this problem?