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

Use Symbolic link instead of Junction Point #3970

Closed

Conversation

walterlv
Copy link

@walterlv walterlv commented May 9, 2020

For Issue

Description

mklink /j is used to make junction points and mklink /d is used to make symbolic links.

My blog and references for mklink command

@chawyehsu
Copy link
Member

chawyehsu commented May 9, 2020

Symbolic links support directories and files while junction points only support directories.

I assume symbolic links you said is mklink /d and this is not true. mklink /d can only create a directory link. And if you look through the commit history of scoop, you will find that it used mklink /d years ago.

@walterlv
Copy link
Author

walterlv commented May 9, 2020

@h404bi OK, you're right. I'll change my description and the pull request.

Then should mklink /d be used instead of mklink /j for directories? This helps to resolve shortcuts lost issue.


EDIT: I find out that #1179 starts to use mklink /j to link current directory. But before that nothing linking method is been used.

walterlv added a commit to walterlv/walterlv.github.io that referenced this pull request May 9, 2020
@chawyehsu
Copy link
Member

I maybe remember incorrectly, but I did remember Scoop was using reparsepoint or something for data persistence, not for shortcuts.

@walterlv
Copy link
Author

So, what about the pull request?

  • Why the CI of Powershell 5.x fails?
  • What should I do for this pull request? Merge it or find some other solutions?

@chawyehsu
Copy link
Member

chawyehsu commented May 12, 2020

Why the CI of Powershell 5.x fails?

The code linting fails, some rules have changed in the new version of PSScriptAnalyzer, and we don't update it yet.

What should I do for this pull request? Merge it or find some other solutions?

Maybe some tests?

@walterlv
Copy link
Author

@h404bi Maybe I have to know how to deploy the compiled scoop to my computer instead of the released one and know what basic tests should I do. At last, wait for next week's Windows Updater and check whether if this issue is resolved.

@chawyehsu
Copy link
Member

chawyehsu commented May 13, 2020

@walterlv And you should know that mklink /d does require admin rights to perform.

@walterlv
Copy link
Author

@h404bi Yes! mklink /d requires admin rights and I find that the /d option exists in the current version code. So is it works well? I doubt not.

The blog posts posted in this pull request are written by me and have mentioned the administrative rights.

@chawyehsu
Copy link
Member

So is it works well?

Users w/o admin rights may encounter issues. Except for global installation, avoiding admin rights is a core feature of Scoop.

@walterlv
Copy link
Author

walterlv commented Jun 11, 2020

@chawyehsu BAD NEWS!

A blog of Microsoft says:

Starting with Windows 10 Insiders build 14972, symlinks can be created without needing to elevate the console as administrator. This will allow developers, tools and projects, that previously struggled to work effectively on Windows due to symlink issues, to behave just as efficiently and reliably as they do on Linux or OSX.

This means that for most computers, the symbolic link needs to run as administrator. To avoid this, we MUST turn on the developer mode.

See more details here and here:

Developer Mode

@chawyehsu
Copy link
Member

chawyehsu commented Jun 11, 2020

@walterlv yes, I've known it and that's why junction point is used. I've read the blog post from Windows Developer Blog for so many times. lol

@c33s
Copy link
Contributor

c33s commented Apr 28, 2021

i prefer junctions as they simply work and don't need to admin or changing to developer mode.

@rashil2000
Copy link
Member

mklink /d requires admin rights and I find that the /d option exists in the current version code.

There are no instances of mklink /d in the codebase.

I'm closing this as symbolic link creation requires admin rights (or enabling developer mode, which also requires admin right).

@rashil2000 rashil2000 closed this Jan 8, 2022
@ipcjs
Copy link
Contributor

ipcjs commented May 11, 2022

Maybe we could give priority to the /d option and then use the /j option if we don't have permission?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants