locked
Missing environment variables RRS feed

  • Question

  • When I do ControlPanel->System->Adv.SystemSettings->EnvironmentVariables, approximately half of the system

    environment variables (as shown in registry key HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment, and as shown by set command) do not appear. Can I fix this?

    Wednesday, October 15, 2008 4:43 PM

Answers

  • Thanks for the reply, Sean. It seems I was mistaken about the HKLM\SYSTEM\CurrentControlSet\Control\

    Session Manager\Environment registry key: currently, the content of that key corresponds exactly with the list of system

    environment variables shown in the Control Panel app. However, the "set" command still shows 13 environment variables

    which do not appear there. I found some of the "missing" variables in the HKCU\Volatile Environment registry key and I am sure the rest are lurking about in the registry somewhere. I enquired about this because I was trying to clean up the

    considerable amount of junk left behind by some uninstalled programs, said junk including some environment variables.

    In my research on this issue I had encountered a Microsoft KB article concerning a previous version of Windows which

    indicated an inability of the Control Panel app to show more than 16 environment variables , and I was wondering whether

    something of the sort was affecting my own results. Evidently not: my experiments show that I am unlikely to be limited by any such restriction. I am sure there is some limitation here, but of course Microsoft does not disclose such finicky

    details about their products.

     

    Wednesday, October 22, 2008 3:14 AM

All replies

  • Could it be caused by an invalid character in the registry key?

     

    In XP, there was a similar problem where a number of items were missing in Add or Remove Programs, caused by a minus sign in a registry key.

    Thursday, October 16, 2008 2:19 PM
  •  

    Hi b.catha, I have checked this issue. This also occurs on my computers and I consider this issue is by design. In order to avoid user to modify some settings by using set, some of the entries do not appear on set command. This can be a security purpose to avoid incorrect adjustment on critical system settings in environment variables.

    Tuesday, October 21, 2008 9:26 AM
    Moderator
  • Thanks for the reply, Sean. It seems I was mistaken about the HKLM\SYSTEM\CurrentControlSet\Control\

    Session Manager\Environment registry key: currently, the content of that key corresponds exactly with the list of system

    environment variables shown in the Control Panel app. However, the "set" command still shows 13 environment variables

    which do not appear there. I found some of the "missing" variables in the HKCU\Volatile Environment registry key and I am sure the rest are lurking about in the registry somewhere. I enquired about this because I was trying to clean up the

    considerable amount of junk left behind by some uninstalled programs, said junk including some environment variables.

    In my research on this issue I had encountered a Microsoft KB article concerning a previous version of Windows which

    indicated an inability of the Control Panel app to show more than 16 environment variables , and I was wondering whether

    something of the sort was affecting my own results. Evidently not: my experiments show that I am unlikely to be limited by any such restriction. I am sure there is some limitation here, but of course Microsoft does not disclose such finicky

    details about their products.

     

    Wednesday, October 22, 2008 3:14 AM