Hacker News new | ask | show | jobs
by RajT88 918 days ago
Strange they used shortcuts on Windows, as Windows has had links since Vista:

https://blogs.windows.com/windowsdeveloper/2016/12/02/symlin...

Either this is because it's not at all well known, or because they think some users will be on XP. (Which would be strange)

2 comments

Maybe it was easier? Iirc at least in some recent ish Windows versions, by default you needed admin privileges to run mklink. Given that a shortcut is just a regular file, that solves a lot of problems.
That depends on your version of windows (newer versions are more relaxed on it). Also file links are 'weird' in windows.

You have 3 types junction points, file links and directory links. Each one acting in its very weird odd way. Junction points are for local only directories. Files for files and directories can be either local dirs or remote SMB points. Junctions vs dir can be an interesting trade off on what you want it to do. With junciton being faster for many operations but local only. Also if the file is less than ~500 bytes there is no real gain as you will probably just consume MFT anyway either way.

You need SeCreateSymbolicLinkPrivilege to create symlinks in both Win 10 and Win 11.

https://learn.microsoft.com/en-us/windows/security/threat-pr...

Its one of the things enabled by "dev mode" in the control panel.
ah i probably enabled that...
The problem is the max path size. There was a similar problem on Linux, where you have a max number of symlinks you can follow before the system gives up. Macos works because finder resolves symlinks and opens the target directly.