Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-2096

Windows system32 environment variable issue after installation of "RDS-RD-Server"

    Details

    • Template:
    • Team:
      Night's Watch
    • Story Points:
      3
    • Sprint:
      2019-11-27, 2019-12-11, 2019-12-24
    • Method Found:
      Needs Assessment
    • CS Priority:
      Reviewed
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      For os-es older than 2015, Microsoft deprecated api used to read %windir%, so in newer os-es did not function properly anymore in context of mixed 32 and 64 bit application environment (Remote desktop provides such env). Bug was resolved by reading the information from an environment variable %systemroot% which Microsoft documentation states it is consistent and read-only. Tested on supported windows platforms, works as expected.
      Show
      For os-es older than 2015, Microsoft deprecated api used to read %windir%, so in newer os-es did not function properly anymore in context of mixed 32 and 64 bit application environment (Remote desktop provides such env). Bug was resolved by reading the information from an environment variable %systemroot% which Microsoft documentation states it is consistent and read-only. Tested on supported windows platforms, works as expected.
    • QA Risk Assessment:
      Needs Assessment

      Description

      On Windows servers after installation of Remote Desktop Services (Add-WindowsFeature RDS-RD-Server) the Puppet agent populates the system32 fact incorrectly with "C:\Users\username\WINDOWS\system32". Uninstalling RDS-RD-Server and rebooting the server returns the OS fact to "c:\windows\system32".

      With or without RDS-RD-Server installed the result of running the command: 
      wmic os get systemdirectory 
      is always "C:\Windows\system32"

      Example of the "facter os" command output: (`admwintert` - Domain user)
      PS C:\Windows\system32> facter os 

      architecture => "x64", 
      family => "windows", 
      hardware => "x86_64", 
      name => "windows", 
      release =>

      {  full => "2016",  major => "2016"  }, 
      windows => {  system32 => "C:\Users\admwintert\WINDOWS\system32"  } 
      }

       

      Customer ran another test and was able to reproduce the behavior with a vanilla AWS AMI: 
      Windows_Server-2016-English-Full-Base-2019.10.09 (ami-0daaf340f2253cd6c)

      Customer launched, renamed and domain-joined it and then installed puppet. Then installed the Remote Desktop Session Host and rebooted. 'dawintert' is also a domain account.

      PS C:\Windows\system32> facter os 

      architecture => "x64", 
      family => "windows", 
      hardware => "x86_64", 
      name => "windows", 
      release => {  full => "2016",  major => "2016"  }


      windows =>

      {  system32 => "C:\Users\dawintert\WINDOWS\system32"  }

       
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                george.mrejea George Mrejea
                Reporter:
                maheswaran Maheswaran Shanmugam
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support