I am having an issue creating a symbolic link on Windows 7 Ultimate. I want to map a folder from a mapped network drive into My Documents.

mklink /D "C:\Users\Vegard\Documents\Virtual Machines" "Z:\Virtual Machines" returns You do not have sufficient privilege to perform this operation..

Z:\Virtual Machines is set to be available offline, but I am online when I am trying this.

This is what I've tried (as suggested here):

  1. Using Local Security Policy to add my user to Local Polices\User Rights Assignments\Create symbolic links, and rebooting. No luck.

  2. Running cmd.exe as an Administrator, but then I cannot see the mapped network drive at all. I can however create symbolic links on the drive.

  3. Using fsutil to change symlinkevaluation, to set R2L:1 (even though it seem to me I want L2R, which is already enabled).

  4. Using full UNC path of the shared folder does not work either (The syntax of the command is incorrect. when run as an administrator, You do not have sufficient privilege to perform this operation. when run as a normal user).

Output of fsutil behavior query symlinkevaluation:

C:\Windows\system32>fsutil behavior query symlinkevaluation
Local to local symbolic links are enabled.
Local to remote symbolic links are enabled.
Remote to local symbolic links are enabled.
Remote to remote symbolic links are disabled.

Any ideas?

link|improve this question

80% accept rate
Have you tried pointing it to an UNC path? – grawity Nov 14 '10 at 21:21
@grawity: I have now, it did not work. Updated question. – Vegard Larsen Nov 14 '10 at 21:24
As I mentioned below, this is because an elevated prompt does not have the foldershares mapped to it. Try a cd z:` and you'll get an error. run cmd` as a user and see that the folder is mapped. – surfasb Dec 23 '11 at 23:04
feedback

2 Answers

up vote 1 down vote accepted

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.

link|improve this answer
This is because the foldershare is mapped under the user account. When you launch cmd as admin, it launches as an admin account, and does not have the foldershares mapped. – surfasb Dec 23 '11 at 23:03
feedback

Run cmd.exe as administrator and use UNC path.

The following command worked for me as administrator:

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

And also check, if your command contains appropriate ".

link|improve this answer
This also works. – surfasb Dec 23 '11 at 23:03
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.