Fred Simon
Fred Simon

Reputation: 567

Using windows mklink for linking 2 files

I'm trying to find the equivalent of *nix symlink on windows, and started using mklink. The issue is that, as a normal user (not admin), I can link to a folder with the "/J" option, but I cannot link to a file. I managed to do it as administrator, but I need it as standard user.

Why only Administrators can create file links on Windows? Is there a workaround?

Upvotes: 2

Views: 8349

Answers (2)

Lidia
Lidia

Reputation: 2123

Had problems creating links on Windows 10 Home Edition - I was getting "You do not have sufficient privilege to perform this operation". In the end, I was able to create a soft link using power shell with this command:

   cmd /c mklink /J c:\path\to\symlink d:\target\directory

The above creates a soft link but does not work for symbolic links (/D option). Soft link was sufficient for my needs (and I didn't have to install gpedit.msc).

Upvotes: 1

snoone
snoone

Reputation: 5499

You need the SeCreateSymbolicLinkPrivilege to create a symbolic link, which I don't think users get by default.

-scott

Upvotes: 6

Related Questions