Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was trying to use mklink command in cmd (i have Windows 7 os) I was logged on as administrator, but i got a " you do not have sufficient privilege to perform this operation" message. I used the same command in Vista, it worked ok. Any ideas why it does not work in Winows 7?

share|improve this question

Try explicitly running the cmd shell as administrator. If that doesn't help, then try the runas command.

runas /user:administrator "mklink args"

Quotes around the mklink command and its args are required.

share|improve this answer
14  
Symlinks are too dangerous for a normal user. LOL. I wish I could understand the considerations behind this. :-( – Notinlist Apr 14 '11 at 13:34
    
My user is an administrator (there is no user called "administrator" on this machine.) but I still get "You do not have sufficient privilege to perform this operation." – Jonathan Hartley Jan 8 '12 at 18:35
2  
This answer, although helpful advice in the general case, seems to be exactly the opposite of the behaviour I'm observing: mklink only works for me when my user is not an administrator. Puzzling. – Jonathan Hartley Jan 9 '12 at 0:41
    
what to do if you don't have a login password? it is asking for one and if I leave blank it tells me blank password error... – ecoe Aug 17 '14 at 18:21
    
so, after finding out winblows broke the years and years old 'cd' syntax for cd /D, you get to type in the mklink syntax in the horrible contraption called 'cmd.exe' to find out you don't have privileges nad had to run as administrator first. Winblows sysadmin, the horror aaargh. – Michael Trouw Jan 18 at 18:23

type CMD, you will see CMD.exe in the list at start menu.

Right click on it, select "Run as Administrator"

share|improve this answer

First, make sure you've granted the "Create symlinks" permission to the relevant users, as detailed here: http://superuser.com/a/125981/57697

Bizarrely, the "mklink" command will not work for me if my user is an administrator. It gives "You do not have sufficient privilege to perform this operation."

To make it work, I then need to either remove my user from the administrators group, or run mklink from a cmd which has been run as a non-admin user such as guest:

   runas /user:guest cmd

(enable the guest account if it isn't already)

Using this latter method, you'll also have to temporarily grant permissions for 'guest' to modify the location you're creating the symlink in, which in my case was my home directory, causing a flurry of error dialogs, but they seemed harmless.

share|improve this answer

In response to this not working for administrator accounts, I believe that Configuring symlink support in Win7 is relevant.

After giving “Everyone” the privilege “Create symbolic link”, please reboot (or log off) and log in as a standard user, a user who is NOT a member of group “Administrators”. You should be able to create a symbolic link using mklink command in a directory where user has write permissions.

The reason a member of “Administrators” cannot create symbolic link is because “Create symbolic link” privilege is removed from the filtered token since user is a member of “Administrators” group. Section “Access Token Changes” of article at link http://msdn.microsoft.com/en-us/library/bb530410.aspx describes in more details on how filtered token is created.

share|improve this answer

Check to see the "secondary logon" service isn't disabled.

share|improve this answer
5  
As a highly valued Super User, I suggest you revisit this answer and add more detail. – KronoS Jul 27 '12 at 21:54

The error "You do not have sufficient privilege to perform this operation" does arise even under elevated privileges when attempting to create a directory symbolic link in certain cases, such as between drives. In these cases, you might perhaps instead be wanting to create a Junction. With due respect please check and see if perhaps what you really want is a Junction. If in fact you are attempting to create a directory symbolic link and do indeed know what you're doing then this is something I don't know about. I do think the error message is not helpful, but perhaps for novice administrators it is appropriate in an ironic manner. (smile)

share|improve this answer
    
Welcome to Super User! This is really a comment and not an answer to the original question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. Please read Why do I need 50 reputation to comment? What can I do instead? – DavidPostill Feb 1 at 0:00

If not installed, please installing Microsoft.net framework 2.0 or the service packs that go with it. It worked for me!

share|improve this answer

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.