puppetlabs/puppet-win32-ruby — pull request #28 by Iristyle (2014-05-01 22:31:05+00:00)
Title: (PUP-1591) Allow elevate.exe to run against .NET 4

- Various Windows editions ship with various editions of the .NET
Framework. This can also vary by how recently Windows Updates have
run, and local AD policy.
- According to Corflags.exe, elevate.exe has the following properties
CorFlags.exe .\elevate.exe
Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 4.0.30319.33440
Copyright (c) Microsoft Corporation. All rights reserved.

Version : v2.0.50727
CLR Header: 2.5
PE : PE32
CorFlags : 0x9
ILONLY : 1
32BITREQ : 0
32BITPREF : 0
Signed : 1
- .NET 3.5, 3.0 and 2.0.50727 all use the .NET 2.0 CLR, so we can allow
elevate.exe to run on any of these.
- After some manual testing, it was determined that the .NET 4.0 CLR
also works correctly for elevate.exe, and so we can override the .NET
runtime selection by providing a side ar elevate.exe.config file.