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

Allow Windows users in developer mode to create symlinks without elevation #8534

Merged
merged 4 commits into from
Jan 8, 2019

Conversation

SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Dec 24, 2018

PR Summary

Leverage new flag in CreateSymbolicLink() API to not require elevation if using Developer Mode. Include check if using WIn10 >= build 14972 which supports the new flag. Modified tests to check if developer mode is enabled.

Fix #2845

PR Checklist

@iSazonov
Copy link
Collaborator

Related test failed (Should error correctly when failing to create a symbolic link).

@lzybkr
Copy link
Member

lzybkr commented Dec 24, 2018

Do you need an OS version check or a check for developer mode? Some APIs reject unknown/unsupported flags.

Or to put it another way, did you test on Win7/Win8 and on Win10 w/ developer mode turned off?

@ExE-Boss
Copy link

ExE-Boss commented Dec 25, 2018

Do you need an OS version check or a check for developer mode? Some APIs reject unknown/unsupported flags.

IIRC, I’m pretty sure that this is one such API (you need an OS version check, as the developer mode check is done by Windows 10).

@SteveL-MSFT
Copy link
Member Author

Updated test to handle whether it's in Developer Mode or not. Validated on Win10 that when Developer Mode is not enabled, it fails as previously without elevation. Win7 still installing updates.

@SteveL-MSFT
Copy link
Member Author

Manually verified on Win7

@adityapatwardhan
Copy link
Member

@SteveL-MSFT I think this will be a breaking change. Do you agree?

@ExE-Boss
Copy link

ExE-Boss commented Jan 8, 2019

@adityapatwardhan I don’t think so, given that previously it would be impossible to create symlinks without elevation, but with this, when developer mode is enabled, it’s possible to create symlinks without requiring eleveation.

@SteveL-MSFT
Copy link
Member Author

@adityapatwardhan I don't think it's a breaking change in the sense that it's impactful. It would only affect tests that previously expected failure.

@adityapatwardhan adityapatwardhan added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Jan 8, 2019
@adityapatwardhan adityapatwardhan merged commit d6000fd into PowerShell:master Jan 8, 2019
@SteveL-MSFT SteveL-MSFT deleted the win-symlink branch January 8, 2019 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Leverage new API for creating symlink without administrator privileges on Windows
5 participants