PDA

View Full Version : Adding permissions to folders



Infohos
11-04-2002, 10:28 AM
Is there a way to grant specific rights on the INSTALLDIR and on another (own) directory under c:\program files\common files to the user that is logged on during the install?

I found the "Destination Permissions" of the component (using [%USERDOMAIN] and [LogonUser]) but they replace the existing permissions; I would like to add a permissions regardless of what there is already there.

Thanks.

Marwan
11-04-2002, 11:19 AM
MSI only supports adding new permissions and not appending to the existing ones, but take a look at this KB:

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q279682

It explains how to modify permissions using VBScript & ADSI

I also found some good code samples here:
http://www.serverwatch.com/tutorials/article.php/1476721
http://www.serverwatch.com/tutorials/article.php/1476741
http://www.serverwatch.com/tutorials/article.php/1476751

Hope this helps

oliverf
11-05-2002, 10:06 AM
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/lockpermissions_table.asp

might more be more suitable as it requires only a single entry to
the msi database(lockpermissions) table

Art Middlekauff
11-05-2002, 06:43 PM
Yes, the LockPermissions table is nice. But in all of our tests, entries in LockPermissions cause the Windows Installer to replace the existing permissions. We don't know of a way to use LockPermissions to add a permission regardless of what is already there.