Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for symlink creation privilege for portable install #2369

Merged
merged 5 commits into from
Jul 27, 2022

Conversation

ryfu-msft
Copy link
Contributor

@ryfu-msft ryfu-msft commented Jul 26, 2022

Fixes #2364
Related to #2368

Checks if developer mode is enabled for portable install. If developer mode is not enabled, requires command to be running as admin. Additionally, a link to the related GitHub issue is displayed to the user.

Tests:

  • Added test functionality to verify IsDevModeEnabled()
  • Added unit test to verify that github issue is displayed properly if developer mode is off and not running as admin.
Microsoft Reviewers: Open in CodeFlow

@ryfu-msft ryfu-msft requested a review from a team as a code owner July 26, 2022 00:16
@ghost ghost added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Jul 26, 2022
src/AppInstallerCLICore/Workflows/PortableFlow.cpp Outdated Show resolved Hide resolved
src/AppInstallerCommonCore/Runtime.cpp Outdated Show resolved Hide resolved
src/AppInstallerCLITests/TestCommon.cpp Outdated Show resolved Hide resolved
src/AppInstallerCommonCore/Runtime.cpp Show resolved Hide resolved
@ghost ghost added the Needs-Author-Feedback Issue needs attention from issue or PR author label Jul 26, 2022
@ghost ghost removed the Needs-Author-Feedback Issue needs attention from issue or PR author label Jul 26, 2022
@ryfu-msft ryfu-msft requested a review from JohnMcPMS July 26, 2022 22:58
@ryfu-msft ryfu-msft merged commit 3d7f35c into microsoft:master Jul 27, 2022
@ryfu-msft ryfu-msft deleted the symlinkPrivilege branch July 27, 2022 16:00
@jantari
Copy link

jantari commented Sep 2, 2022

Why does this test for running as admin? AFAIK all that is required to create symlinks is having SeCreateSymbolicLinkPrivilege, not being an administrator.

@denelon
Copy link
Contributor

denelon commented Sep 2, 2022

@jantari it requires either the user to be in administrator mode or to have developer mode enabled on Windows. A normal user account otherwise can't create symbolic links. It was a very late breaking issue we ran into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installer failed with exit code: 0x8a150003
5 participants