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!
> 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.