SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE, Create SymbolicLink
Asked Answered
P

1

6

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.

Pretoria answered 8/12, 2016 at 14:17 Comment(0)
T
5

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

Tsang answered 8/12, 2016 at 14:44 Comment(1)
Thanks for the reply I was poking around, and realized it has to do with components that arent commonly in the user base Im still unsure as to why my helper app isnt working, when it used to (I added the 0x02 today, just to try it, on Win10) Im going to mark this as answered and put the question in a way that doesnt reference the 0x02 flagPretoria

© 2022 - 2024 — McMap. All rights reserved.