microsoft / microsoft/msix-packaging
Relaunching as admin for msixmgr depends on having msixmgr.exe in %PATH%.
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1.1k
- Forks
- 193
- Avg merge
- 2h 16m
- Merged PRs (30d)
- 2
Description
Project
Win7Msix
Describe the bug
We've had a few reports recently that the installation of msix packages wasn't working on windows 7. The reported error was "Windows cannot find 'msixmgr.exe'. Make sure you typed the name correctly, and then try again." when launching the msix file. I investigated further and found out that because environment variables are inherited when launching sub processes, if you install msixmgr from any browser (Chrome in this instance), and then without restarting it try to install the msix package the error would occur.
To Reproduce
- On Windows 7 open chrome or edge browser
- Download and install msixmgr without closing the browser
- Download / launch any msix package
Expected behavior
The msix package installation is successfully initiated.
Screenshots

Platform
Windows 7 SP1
Additional context
I think the problem is in how relaunching as admin is implemented.
https://github.com/microsoft/msix-packaging/blob/e00e737ba572fdedf561b0f246bac56821f95603/MsixCore/msixmgr/msixmgr.cpp#L103-L108
The issue is that lpFile is not the full path to msixmgr.exe. Since the exe is already executing we can use GetModuleFileNameW as it is done here: https://github.com/microsoft/msix-packaging/blob/e00e737ba572fdedf561b0f246bac56821f95603/MsixCore/msixmgr/msixmgr.cpp#L35-L36 to obtain full path and use it instead.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in MsixCore/msixmgr/msixmgr.cpp, especially the relaunch-as-admin code at lines 103-108 and the existing GetModuleFileNameW use near lines 35-36. Reproduce the Windows 7 browser-install scenario, then verify that relaunching works without requiring msixmgr.exe in the inherited PATH.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100