-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Conversation
2777793
to
8d1c684
Compare
Related test failed ( |
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? |
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). |
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. |
6018796
to
dca5d00
Compare
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
…hout dependency on build number
Manually verified on Win7 |
@SteveL-MSFT I think this will be a breaking change. Do you agree? |
@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. |
@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. |
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
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
to the beginning of the title and remove the prefix when the PR is ready.[feature]
if the change is significant or affects feature tests