Windows 10: Buggy environment variable substitution - the order should NOT matter!

Discus and support Buggy environment variable substitution - the order should NOT matter! in Windows 10 Support to solve the problem; In preparation of an upcoming development project I downloaded and installed the latest Maven version. Then - as instructed - I defined me two... Discussion in 'Windows 10 Support' started by mmo, Feb 6, 2019.

  1. MMO
    mmo Win User

    Buggy environment variable substitution - the order should NOT matter!


    In preparation of an upcoming development project I downloaded and installed the latest Maven version.
    Then - as instructed - I defined me two environment variables:
    Code: M2=%M2_HOME%\bin M2_HOME=C:\Program Files\Apache Software Foundation\apache-maven-3.6.0[/quote] But for some strange reason the former %-placeholder 'M2' is not processed, i.e. "set" just yields:
    Code: M2=%M2_HOME%\bin M2_HOME=C:\Program Files\Apache Software Foundation\apache-maven-3.6.0[/quote] It seems that the order in which the env-var dialog stores these variables is important and if a former variable refers to one further down in the alphabetical list, then: bad luck!

    To test that hypothesis I defined me:
    Code: TestX=%TestY%\test3 TestY=%TestZ%\test2 TestZ=%JAVA_HOME%\test1[/quote] and the result is:
    Code: TestX=%TestY%\test3 TestY=%TestZ%\test2 TestZ=C:\Program Files\Java\jdk-11.0\test1[/quote] :-(

    This - dear MicroSoft guys - is BUGGY! Such substitutions should/needs to work regardless of the ordering of the environment variables names! Unbelievable, that nobody at MS ever noticed and fixed this!

    :)
     
  2. MCK
    mck Win User

    System environment variable won't stick


    Running Win10 Home on an Acer Spin 3, 64bit, i7cpu. I try to add a path to the system environment variables by:

    1. Control Panel > System > Advanced system settings > Advanced tab > Environment variables

    2. The "Environment Variables" window opens.
    3. In the "System Variables" pane I select "Path" and click the EDIT button.
    4. A list of the current system paths is displayed.
    5. I click the NEW button, browse to the path I want to add which is "C:\Python36-32" and click OK. The path "C:\Python36-32" is added to the list of current system paths.
    6. I click OK and am returned to the "Environment Variables" window.
    7. I click the "X" at the top right to close the "Environment Variables" window.

    Now if I click the "Environment Variables" button again (end of step-1) and repeat steps 2-4, the new path I added in step-5 is gone. IOW, adding a new path won't stick.

    What am I doing wrong?
     
  3. Searching environment variable in list

    I'm using a command that gives me a list of environment variables. When searching in the list, I want to find all environment variables with the word
    EXTERNAL; using the following command all that is occurring is all the environment variables are being listed instead of those environment variables with the word
    EXTERNAL ?

    findstr /c "EXTERNAL"
     
    StraightWorld, Feb 6, 2019
    #3
  4. Buggy environment variable substitution - the order should NOT matter!

    Edit - Set Environment Variables

    Recently I upgraded my Machine from Win 8 to Win 10, but I encountered many problems like virtual boxes related issues that does not create any problems prior to upgrading to Win 10.My mean concern as of now is I cant edit the system variable even I logged
    as the admin of my machine.I would like to add Java Jdk but windows does not allow me to add the path to environment variables.

    Is this a bug? Or what are the steps in order to edit environment variables in Windows 10 machine

    Ian
     
    ianrusseladem, Feb 6, 2019
    #4
Thema:

Buggy environment variable substitution - the order should NOT matter!

Loading...
  1. Buggy environment variable substitution - the order should NOT matter! - Similar Threads - Buggy environment variable

  2. environment variables

    in Windows 10 Software and Apps
    environment variables: Cant get the modal window when editing my system variables from the environment variables areai get this windowand i want this window https://answers.microsoft.com/en-us/windows/forum/all/environment-variables/07d24fc8-345d-4062-8169-3fa9bb16a049
  3. environment variables

    in Windows 10 Gaming
    environment variables: Cant get the modal window when editing my system variables from the environment variables areai get this windowand i want this window https://answers.microsoft.com/en-us/windows/forum/all/environment-variables/07d24fc8-345d-4062-8169-3fa9bb16a049
  4. environment variables

    in Windows 10 Customization
    environment variables: I have accidentally deleted all environment variables and now can't reset PC, sound problems and having errors withsoftware installations and running of other apps https://answers.microsoft.com/en-us/windows/forum/all/environment-variables/3412f031-f141-4fb5-858c-009dd5639860
  5. environment variables

    in Windows 10 Customization
    environment variables: Hi, another question from a noob. I see in my PC environment variables at the bottom of the list a sole entry called ZES_ENABLE SYSMAN 1 .I am a sole PC home windows 10 user who only really games a lot. Should this be here, i can only find entries for this in the...
  6. DRM environment variables

    in Windows 10 Ask Insider
    DRM environment variables: Hello, Long story short, I tried to install a develpment kit (QT5 android development) and needed to add a environment variable. I somehow overwrote some other variables (misclicked....) and now DRM content e.g. via the amazon prime app is no longer working (gives me a DRM...
  7. Environment Variables

    in Windows 10 Customization
    Environment Variables: I am unable to add USER Variable in windows environment variable setting. Not asking for Path variables in system variables. Help will be appreciated. Thanks https://answers.microsoft.com/en-us/windows/forum/all/environment-variables/0d063cb8-ccde-465d-8b8b-d5c1ea880c78
  8. environment variable

    in Windows 10 Customization
    environment variable: What would happen when we deleted all the environment variable system directory. https://answers.microsoft.com/en-us/windows/forum/all/environment-variable/723a4cb6-5baf-4907-a56b-614f35d77da5
  9. windows environment variable

    in Windows 10 Installation and Upgrade
    windows environment variable: I have deleted all thing and every thing from windows environment variable that's why I faces problem in running programe than how can I setup environment variable again?...
  10. Environment Variables

    in Windows 10 BSOD Crashes and Debugging
    Environment Variables: what will happen if i accidentally delete one of those environment variables without realizing it ? and how to fix it ? https://answers.microsoft.com/en-us/windows/forum/all/environment-variables/fedbdf36-ce8e-4861-a775-1dc62dd1c67e