Windows 10 Creators Update: Symlinks without elevation
Microsoft announced a change in Windows 10's most recent Insider Build recently that improves the handling of symlinks -- symbolic links -- on Windows 10.
Symbolic links have been part of Windows since Vista, and are a mighty useful feature of the operating system.
A symbolic link can best be described as a pointer that redirects to another file or folder. They are used by the operating system, may be used by applications, and may also be added and managed manually by users.
One basic example: Say your main hard drive is filling up with files and you have little space left. While you could go ahead and uninstall some programs or games to free up space -- after running various clean-up operations -- you could make use of symbolic links instead.
So, instead of uninstalling the game or program, you would make use of symbolic links to move it to another hard drive. Symbolic links would point to the new location from the old, and for Windows and all programs involved, the program or game would still reside in the original directory.
Tip: You can display the symbolic links on your Windows machine with NTFS Links View. Interested in how Linux handles links? Here you go.
Symlinks without elevation
Symbolic links are created on Windows using mklink, a command line tool. Developers have created various programs, many with a graphical user interface, to improve the usability and functionality.
There is Junction by SysInternals for instance, or Link Shell Extension which can be used right from Windows Explorer.
Up until now, mklink required Windows users to run the command from an elevated command prompt. According to Microsoft, this requirement caused symbolic links to be used less frequently on Windows than on *nix machines. It had the effect that "many modern cross-platform development tools" worked "less efficiently and reliably on Windows".
Starting with the Windows 10 Insider Build 14972, and coming to all users in March 2017 when the Windows 10 Creators Update is released, this requirement is no longer set in stone.
You need to enable Developer Mode on the Windows 10 machine, and if you do, any user on the machine may run mklink without elevation to create and change symbolic links.
The main drive for the change was the rise of development tools like git or package managers like npm which support and use symlinks.
Many popular development tools like git and package managers like npm recognize and persist symlinks when creating repos or packages, respectively. When those repos or packages are then restored elsewhere, the symlinks are also restored, ensuring disk space (and the userâ€™s time) isnâ€™t wasted.
Enable Developer Mode
Do the following to enable Developer Mode on the Windows 10 machine:
- Use the shortcut Windows-I to open the Settings application.
- Navigate to Update & Security > For Developers.
- Switch from "Windows Store apps" to "Developer Mode" on the screen.
Now You: Do you make use of symbolic links?
Junction Link Magic 2.0 from Rekenwonder.
One thing I use it for is to move Google Earth data (up to 2GB) to another drive.
I see this as a bad thing and could potentially be abused by malware/spyware. Even on *nix based systems, you basically have to have permission to perform the command.
While the command still will probably block those in more “sensitive” areas, most of the time when you install a program you need elevated permissions to run. Thus giving the malware/spyware/virus all the permission it needs to screw things up.
Will you be using symlinks even with this now available? Could you switch to developer mode make your symlinks then turn it back off? Would that guard against the malware/spyware concern?