Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Programmatically Adding Permissions to Shortcuts

0 views
Skip to first unread message

U.P.S.

unread,
Sep 17, 1997, 3:00:00 AM9/17/97
to

I'm using fCreateShellLink successfully to create shortcuts but I need to
add permissions to them - any ideas?

For instance, if I wanted to add Domain Admins and give this group Full
Control Access is there an API function I could use to do this?

Any assistance would be greatly appreciated!

Felix Kasza [MVP]

unread,
Sep 18, 1997, 3:00:00 AM9/18/97
to

ibm1amb,

> For instance, if I wanted to add Domain Admins and give this group Full
> Control Access is there an API function I could use to do this?

Get the path to the shortcut file and call GetNamedSecurityInfo(),
SetNamedSecurityInfo(). Or open it and use GetSecurityInfo(),
SetSecurityInfo(). Or use GetFileSecurity(), SetFileSecurity().

You will need a whole bunch of APIs to deal with the modification to
the ACL itself; may I refer you to the Win32 SDK docs? The MS web site
also has a bunch of excellent articles on that topic -- check out
http://www.microsoft.com/win32dev/netwrk/wnetwrk.htm#Security for
Ruediger Asche's invaluable introductory articles. Of course, you can
find these also on your MSDN Library CD.

Cheers,
Felix.

--
If you post a reply, kindly refrain from emailing it, too.

0 new messages