The Computer Oracle

Creating a symbolic link to mapped network drive in Windows

-------------------------------------------------------------------------------
Become or hire the top 3% of the developers on Toptal https://topt.al/25cXVn
-------------------------------------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Mysterious Puzzle

--

Chapters
00:00 Question
02:04 Accepted answer (Score 1)
02:30 Answer 2 (Score 68)
02:52 Answer 3 (Score 11)
03:59 Answer 4 (Score 4)
04:21 Thank you

--

Full question
https://superuser.com/questions/210824/c...

Question links:
[here]: https://superuser.com/questions/124679/h...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#windows7 #symboliclink

#avk47



ANSWER 1

Score 73


Run cmd as administrator and use UNC path.

The following command worked for me as administrator:

mklink /D C:\temp11111 \\server\share\foldername\

And also check whether your command contains appropriate quotes (").




ANSWER 2

Score 12


This is a old thread, but still want to clarify that you can create symbolic links like this:

Your user account has some security policies on them by default which can be disabled, through secpol.msc. Go to the Run dialog and type:

secpol.msc
  • Navigate to: Local Policies > User Rights Assignment
  • Double click: Create Symbolic Links
  • Add your username to the list, click OK
  • Log off

When you log back in, run cmd with admin privileges. Now you should be able to run mklink commands like this with no problems:

mklink /d %userprofile%\music \\server\music

Note: Make sure the directory you're trying to link to exists or hasn't been moved or deleted, prior to linking.




ACCEPTED ANSWER

Score 0


My solution became to disable User Account Control, reboot, then create the symlinks as my own user, then re-enabling UAC and rebooting again.

Rather unfortunate if I need to create further symlinks at a later stage, but it does work, it is just very inconvenient.




ANSWER 4

Score 0


You need to enable local to remote links by running this command with elevated rights:

fsutil behavior set SymlinkEvaluation L2R:1

Also you can enable this with your local or group policy: Computer\System\Filesystem\Selectively allow the evaluation of a symbolic link → allow local to remote