GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Allow Windows users in developer mode to create symlinks without elevation by SteveL-MSFT · Pull Request #8534 · PowerShell/PowerShell

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Dec 24, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Change is not breaking
  • Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
  • This PR is ready to merge and is not Work in Progress.
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready.
  • User-facing changes
    • Not Applicable
    • OR
    • User-facing add note about behavior on win10 creating symlinks MicrosoftDocs/PowerShell-Docs#3473
      • Issue filed - Issue link:
  • Testing - New and feature
    • Not Applicable or can only be tested interactively
    • OR
    • Make sure you've added a new test if existing tests do not effectively test the code changed
      • Add [feature] if the change is significant or affects feature tests

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

yhvicey, bergmeister, winstliu, saschanaz, and LYP951018 reacted with thumbs up emoji andyleejordan and LYP951018 reacted with hooray emoji
All reactions
  • 👍 5 reactions
  • 🎉 2 reactions
@SteveL-MSFT Steve Lee (SteveL-MSFT) assigned Aditya Patwardhan (adityapatwardhan) Dec 24, 2018
@SteveL-MSFT
Steve Lee (SteveL-MSFT) requested a review from Andrew (anmenaga) December 24, 2018 06:43
@SteveL-MSFT
Steve Lee (SteveL-MSFT) requested a review from Bruce Payette (BrucePay) as a code owner December 24, 2018 06:43
@SteveL-MSFT Steve Lee (SteveL-MSFT) mentioned this pull request Dec 24, 2018
add note about behavior on win10 creating symlinks MicrosoftDocs/PowerShell-Docs#3473
Merged
2 of 9 tasks
Steve Lee (POWERSHELL)
add flag to allow developer mode to create symlinks without elevation
8d1c684
@SteveL-MSFT
Steve Lee (SteveL-MSFT) force-pushed the win-symlink branch from 2777793 to 8d1c684 Compare December 24, 2018 06:53
iSazonov
Ilya (iSazonov) approved these changes Dec 24, 2018
View reviewed changes
@iSazonov

Ilya (iSazonov) commented Dec 24, 2018

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lzybkr

Jason Shirk (lzybkr) commented Dec 24, 2018

Copy link
Copy Markdown
Contributor

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 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ExE-Boss

ExE Boss (ExE-Boss) commented Dec 25, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Steve Lee (POWERSHELL)
update test to handle being in developer mode or not
95db3e4
@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Dec 25, 2018

Copy link
Copy Markdown
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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Steve Lee (POWERSHELL)
address Jason's feedback
dca5d00
@SteveL-MSFT
Steve Lee (SteveL-MSFT) force-pushed the win-symlink branch from 6018796 to dca5d00 Compare December 25, 2018 01:58
lzybkr
Jason Shirk (lzybkr) reviewed Dec 26, 2018
View reviewed changes
Comment thread src/System.Management.Automation/namespaces/FileSystemProvider.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Steve Lee (POWERSHELL)
fix Windows versin check to correctly check for future Windows 11 wit…
87dc682
…hout dependency on build number
@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Dec 29, 2018

Copy link
Copy Markdown
Member Author

Manually verified on Win7

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adityapatwardhan

Aditya Patwardhan (adityapatwardhan) commented Jan 8, 2019

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ExE-Boss

ExE Boss (ExE-Boss) commented Jan 8, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Aditya Patwardhan (@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Jan 8, 2019

Copy link
Copy Markdown
Member Author

Aditya Patwardhan (@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.

vexx32 and ExE-Boss reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adityapatwardhan Aditya Patwardhan (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
Aditya Patwardhan (adityapatwardhan) merged commit d6000fd into PowerShell:master Jan 8, 2019
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the win-symlink branch January 8, 2019 19:06
@daviewales David Wales (daviewales) mentioned this pull request Jan 8, 2026
Terminal overwriting hard link to settings.json microsoft/terminal#14730
Open
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@SteveL-MSFT @adityapatwardhan
Allow Windows users in developer mode to create symlinks without elev…
4f2081f
…ation (PowerShell#8534)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@iSazonov Ilya (iSazonov) iSazonov approved these changes
@anmenaga Andrew (anmenaga) Awaiting requested review from anmenaga
@BrucePay Bruce Payette (BrucePay) Awaiting requested review from BrucePay
+2 more reviewers
@lzybkr Jason Shirk (lzybkr) lzybkr left review comments
@ExE-Boss ExE Boss (ExE-Boss) ExE-Boss left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@adityapatwardhan Aditya Patwardhan (adityapatwardhan)

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Leverage new API for creating symlink without administrator privileges on Windows

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@SteveL-MSFT @iSazonov @lzybkr @ExE-Boss @adityapatwardhan
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.