Page 1 of 2 12 LastLast
  1.    18 Nov 2015 #1
    Join Date : Aug 2015
    Posts : 369
    Windows 10 Pro

    How do I change environment variables in regular User account???


    (The number of primitive bugs in version 1511 is just imagination-defying.)

    Open Control Panel. Open User Accounts applet. On the left there's a link that says Change my environment variables.

    Click image for larger version. 

Name:	Var.png 
Views:	69 
Size:	20.8 KB 
ID:	49090

    Clicking on that link... does nothing (!!!). The link is simply dead.

    What on Earth is going on??? How are we supposed to change environment variables in non-Administrator accounts now? This Change my environment variables link in User Accounts was provided specifically for that purpose. There's no other natural way to do it.

    I know that there are workarounds for this (all ugly), but... WTH? Did they do even basic testing on this 1511 release???

    P.S. Just confirmed that pre-1511 Windows 10 works normally in that regard. This damage was done specifically by 1511 update.
    Last edited by AndreyT; 18 Nov 2015 at 13:52.
      My ComputerSystem Spec
  2.    18 Nov 2015 #2
    Join Date : Apr 2014
    Space coast of Florida
    Posts : 5,373
    Windows 10 Pro X64 16299.19

    Right click on This PC and select Properties.
    Click on Advanced system settings on the left.
    Enter the password for your administrator level account.

    Now you can change environment variables.

    Don't know why doing it through Control Panel doesn't also prompt you for administrator credentials, it should.
      My ComputersSystem Spec
  3.    19 Nov 2015 #3
    Join Date : Aug 2015
    Posts : 369
    Windows 10 Pro
    Thread Starter

    Quote Originally Posted by Ztruker View Post
    Right click on This PC and select Properties.
    Click on Advanced system settings on the left.
    Enter the password for your administrator level account.

    Now you can change environment variables.
    No, you can't.

    By using this method you will gain access to system-wide environment variables and to user-specific environment variables of the administrator, whose password you just entered. This is what you will edit there.

    I don't want to edit administrator's variables.

    I want to edit user-specific environment variables of my current non-admin user. There's no other direct way to do it besides going through the Control Panel, as I described above. The link in User Accounts exists specifically for that purpose.

    The reason it doesn't ask you for password is exactly that: this method will allow a non-admin user to edit their own user-specific environment variables only and nothing else.

    One more time: this issue is specifically and exclusively about the top part of the environment editor window

    Click image for larger version. 

Name:	env.png 
Views:	54 
Size:	18.5 KB 
ID:	49332
    Last edited by AndreyT; 19 Nov 2015 at 14:28.
      My ComputerSystem Spec
  4.    19 Nov 2015 #4
    Join Date : Apr 2014
    Space coast of Florida
    Posts : 5,373
    Windows 10 Pro X64 16299.19

    Okay, agree you can change user and system wider variables, but at least you can change user specific variables there, just don't mess with the system stuff.

    I know it's not a fix and there is definitely a problem but at least this allows you to do what you need to do.

    Have you reported this to Microsoft via the Windows Feedback option?
      My ComputersSystem Spec
  5.    19 Nov 2015 #5
    Join Date : Aug 2015
    Posts : 369
    Windows 10 Pro
    Thread Starter

    Quote Originally Posted by Ztruker View Post
    Okay, agree you can change user and system wider variables, but at least you can change user specific variables there, just don't mess with the system stuff.

    I know it's not a fix and there is definitely a problem but at least this allows you to do what you need to do.
    Sigh... No, it doesn't allow me to do what I need to do. My previous message has a very detailed explanation of why your "Advanced system settings" approach is not even close to what I need to do.

    One more time: I need to edit user-specific variable of a non-admin user, say, Alice. The approach suggested by you will allow me to edit user-specific variables of user Admin​ instead. Even if you are currently logged in as Alice, your "Advanced system settings" approach will take you to the user-specific variables for Admin. Are you aware of that little detail?

    Do you see the problem? I want to edit variables for Alice. Alice, Alice, Alice specifically. Not Admin. Alice. You suggestion cannot and will not edit Alice. Your suggestion will edit Admin. See the problem?

    If something is still not clear to you - feel free to ask.

    And yes, I reported this problem to Microsoft. They acknowledged the bug, asking me to create a Feedback entry, while they are creating their own entry from their end.
    Last edited by AndreyT; 19 Nov 2015 at 22:57.
      My ComputerSystem Spec
  6.    20 Nov 2015 #6
    Join Date : Apr 2014
    Space coast of Florida
    Posts : 5,373
    Windows 10 Pro X64 16299.19

    Okay, I do see it now. Sorry for the thick headedness

    If we knew what clicking on that link was supposed to launch then we'd have a chance to make it work but as it stands, I don't see any way to fix it.

    As a work around, maybe this can work?

    HowTo: Set an Environment Variable in Windows - Command Line and Registry

    Set Environment Variables

    To set persistent environment variables at the command line, we will use setx.exe. It became part of Windows as of Vista/Windows Server 2008. 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.

    setx.exe does not set the environment variable in the current command prompt, but it will be available in subsequent command prompts.
    Code:
    SetX has three ways of working: 
    
    Syntax 1:
        SETX [/S system [/U [domain\]user [/P [password]]]] var value [/M]
    
    Syntax 2:
        SETX [/S system [/U [domain\]user [/P [password]]]] var /K regpath [/M]
    
    Syntax 3:
        SETX [/S system [/U [domain\]user [/P [password]]]]
             /F file {var {/A x,y | /R x,y string}[/M] | /X} [/D delimiters]
    
    Description:
        Creates or modifies environment variables in the user or system
        environment. Can set variables based on arguments, regkeys or
        file input.
    
    Parameter List:
        /S     system          Specifies the remote system to connect to.
    
        /U     [domain\]user   Specifies the user context under which
                               the command should execute.
    
        /P     [password]      Specifies the password for the given
                               user context. Prompts for input if omitted.
    
        var                    Specifies the environment variable to set.
    
        value                  Specifies a value to be assigned to the 
                               environment variable.
    
        /K     regpath         Specifies that the variable is set based
                               on information from a registry key.
                               Path should be specified in the format of
                               hive\key\...\value. For example,
                               HKEY_LOCAL_MACHINE\System\CurrentControlSet\
                               Control\TimeZoneInformation\StandardName.
    
        /F     file            Specifies the filename of the text file
                               to use.
    
        /A     x,y             Specifies absolute file coordinates
                               (line X, item Y) as parameters to search 
                               within the file.
    
        /R     x,y string      Specifies relative file coordinates with
                               respect to "string" as the search parameters.
    
        /M                     Specifies that the variable should be set in
                               the system wide (HKEY_LOCAL_MACHINE)
                               environment. The default is to set the
                               variable under the HKEY_CURRENT_USER 
                               environment.
    
        /X                     Displays file contents with x,y coordinates.
    
        /D     delimiters      Specifies additional delimiters such as ","
                               or "\". The built-in delimiters are space,
                               tab, carriage return, and linefeed. Any 
                               ASCII character can be used as an additional
                               delimiter. The maximum number of delimiters,
                               including the built-in delimiters, is 15.
    
        /?                     Displays this help message.
    
    NOTE: 1) SETX writes variables to the master environment in the registry.
    
          2) On a local system, variables created or modified by this tool
             will be available in future command windows but not in the
             current CMD.exe command window.
    
          3) On a remote system, variables created or modified by this tool
             will be available at the next logon session.
    
          4) The valid Registry Key data types are REG_DWORD, REG_EXPAND_SZ,
             REG_SZ, REG_MULTI_SZ.
    
          5) Supported hives:  HKEY_LOCAL_MACHINE (HKLM),
             HKEY_CURRENT_USER (HKCU).
    
          6) Delimiters are case sensitive.
    
          7) REG_DWORD values are extracted from the registry in decimal 
             format.
    
    Examples:
        SETX MACHINE COMPAQ 
        SETX MACHINE "COMPAQ COMPUTER" /M
        SETX MYPATH "%PATH%"
        SETX MYPATH ~PATH~
        SETX /S system /U user /P password  MACHINE COMPAQ 
        SETX /S system /U user /P password MYPATH ^%PATH^% 
        SETX TZONE /K HKEY_LOCAL_MACHINE\System\CurrentControlSet\
             Control\TimeZoneInformation\StandardName
        SETX BUILD /K "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
             NT\CurrentVersion\CurrentBuildNumber" /M
        SETX /S system /U user /P password TZONE /K HKEY_LOCAL_MACHINE\
             System\CurrentControlSet\Control\TimeZoneInformation\
             StandardName
        SETX /S system /U user /P password  BUILD /K 
             "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\
             CurrentVersion\CurrentBuildNumber" /M
        SETX /F ipconfig.out /X 
        SETX IPADDR /F ipconfig.out /A 5,11 
        SETX OCTET1 /F ipconfig.out /A 5,3 /D "#$*." 
        SETX IPGATEWAY /F ipconfig.out /R 0,7 Gateway
        SETX /S system /U user /P password  /F c:\ipconfig.out /X
      My ComputersSystem Spec
  7.    25 Nov 2015 #7
    Join Date : Aug 2015
    Posts : 369
    Windows 10 Pro
    Thread Starter

    Quote Originally Posted by Ztruker View Post
    SetX has three ways of working:
    SETX is a nice workaround. Unfortunately it's a bit limited: it cannot delete environment variables.

    Microsoft itself suggested PowerShell as a workaround

    Windows PowerShell Tip: Creating and Modifying Environment Variables
      My ComputerSystem Spec
  8.    25 Nov 2015 #8
    Join Date : Apr 2014
    Space coast of Florida
    Posts : 5,373
    Windows 10 Pro X64 16299.19

    No, you use SET to delete them.

    setx abc=123 .... abc is set to 123
    set abc ---------- abc is null and disappears
      My ComputersSystem Spec
  9.    25 Nov 2015 #9
    Join Date : Aug 2015
    Posts : 369
    Windows 10 Pro
    Thread Starter

    Quote Originally Posted by Ztruker View Post
    No, you use SET to delete them.

    setx abc=123 .... abc is set to 123
    set abc ---------- abc is null and disappears
    Um... No, cannot use 'SET' to delete environment variables in the context of this issue. 'SET' is completely irrelevant here.

    • Firstly, the topic here is, one more time, permanent changes to user environment variables. 'SET' does not and cannot make permanent changes. 'SET' can only make changes to the environment of the current process. All these changes are lost once the process terminates. So, 'SET' is not applicable in this topic at all.

      This is exactly why we have 'SETX'. The whole point of 'SETX's existence is that changes made by 'SETX' are permanent.

    • Secondly, I don't know where you got the idea that 'set abc' will make variable 'abc' disappear (?). If variable 'abc' does not exist, then 'set abc' is simply invalid. If variable 'abc' exists, then 'set abc' will simply display its value.

      The proper syntax for "deleting" a variable using 'SET' is 'set abc='. Note the '=' part. However, as I said above, 'SET' is completely irrelevant here.
    Last edited by AndreyT; 26 Nov 2015 at 13:51.
      My ComputerSystem Spec
  10.    04 Jan 2016 #10
    Join Date : Jan 2016
    Posts : 1
    Win10

    this annoys the hell out of me on new build PC's
    I've not come to the bottom of it yet , however what I do is
    :-
    Win X - y [ to get t the system display ]
    advanced system settings
    Environment Variables
    add the ones you want
    ...

    I've found that after a while [it must be something else I do ] then you can edit the user Enviorment variables
      My ComputerSystem Spec

 
Page 1 of 2 12 LastLast


Similar Threads
Thread Forum
User Accounts Change Password of Account in Windows 10
How to Change Password of Local Account or Microsoft Account in Windows 10 If you have a local account on the PC, then your Windows password is what you use to sign in to your user account in Windows on the PC. If you have a Microsoft...
Tutorials
General Tips Environment Variables in Windows 10
Complete List of Environment Variables in Windows 10 Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer. The variables can be used both in scripts and on the command line....
Tutorials
Change User Account Admin rights
I am the sole user of this computer. The control panel tells me I am an administrator but when I go into my account it says I am a standard user and won't let me change it to Administrator. I just want to manage my own computer and - for...
User Accounts and Family Safety
Solved Deleted Environment Variables in Windows 10
I think i accidentally deleted some system variables in my windows 10 OS. What are the defaults variables and their values. Need Help This is my variables33912 and i found a post in your forum Environment Variables in Windows 10 - Windows...
General Support
How to change email associated with Windows 10 user account
Alright, so my issue is that I set up my Microsoft account on my Win10 laptop back when Win10 first released. At the time it was associated with an older email account that I have since changed to a new gmail account. I was able to go into my...
User Accounts and Family Safety
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 16:55.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums