Bill
Bill

Reputation: 89

SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE, Create SymbolicLink

I have a need to create symlinks programmatically

In the field the users will not have Admin privileges, but the links will be created by this helper exe which will be run under the credentials of a user with create symlink privileges. The helper exe is C#.

I have give a user account the require privilege, but the app wont create links unless its run as admin I tried adding a manifest and setting permissions to highestAvailable

I found looking around pages claiming theres an additional flag for CreateSymlink SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE value 0x02

Seemed like just what I needed I tried that but get back error 87, Invalid Parameter

This program worked under Windows7 pro, but under Windows 10 its failing

Any help is appreciated.

Upvotes: 6

Views: 2707

Answers (1)

Skomialek
Skomialek

Reputation: 321

This flag appears to be introduced in the new Windows 10 build 14972 - it won't work before that. (Creators Update) Your application might have worked on Win 7 because the flag was simply ignored.

Additionally you will need to have Developer Mode on. Source

Upvotes: 5

Related Questions