Rework elevation - no more bat file; add KNOWNFOLDERS support #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Our old CSIDL code is deprecated (https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494(v=vs.85).aspx), and in at least one instance from the Anaconda Support mailing list, a CSIDL path was not found. The new way is called KNOWNFOLDERID (https://msdn.microsoft.com/en-us/library/windows/desktop/dd378457(v=vs.85).aspx), and this PR brings it to Menuinst. Win XP uses CSIDL, everything beyond that uses KNOWNFOLDERID.
This rips out the intermediate bat file, in favor of a more Python-based solution. Doing so introduces a dependency on pywin32.
Finally, high-level integration tests are performed - installing shortcuts as user and as admin. You should see interactive elevation notices when running the tests on platforms above XP. If you don't, you might have UAC disabled - please enable it for these tests to make sure that it works.
This PR now addresses unicode support. I have tested this by creating a user named "å test user". When logged on as this user, the new tests here run as both user and admin. I have reasonably high confidence that this fixes the issues with menu installation. _nsis.py will need fixing (in both constructor and in the anaconda build system installer), also, though, since modifying PATH often fails when menu installation fails.
ping @ilanschnell @csoja