Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
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
add comment

3 Answers 3

up vote 4 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.

share|improve this answer
1  
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
add comment

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 (").

share|improve this answer
add comment

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.

share|improve this answer
    
Note; secpol.msc doesn't exist in the home version of win7. –  JonoRR May 28 at 7:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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