cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Permissions On Directorys Im Not installing

CChong
By Level 11 Flexeran
Level 11 Flexeran
Hi guys ....

I really need help Fast ...

I have a product that needs full control on the

c:\documents and settings\all users\application Data

Directory. the package doesn't install anything to there but for some reason still needs rights

Im editing the lock permissions table directly and this is what I have so far

LockObject Table Domain User Permission
s72 s32 S255 s255 I4
LockPermissions LockObject Table Domain User
ALLUSERSPROFILE Directory CREATOR OWNER 268435456
ALLUSERSPROFILE Directory BUILTIN Administrators 268435456
ALLUSERSPROFILE Directory BUILTIN Power Users 268435456
ALLUSERSPROFILE Directory BUILTIN Users 268435456
ALLUSERSPROFILE Directory NT AUTHORITY SYSTEM 268435456
INSTALLDIR CreateFolder CREATOR OWNER 268435456
INSTALLDIR CreateFolder BUILTIN Administrators 268435456
INSTALLDIR CreateFolder BUILTIN Power Users 268435456
INSTALLDIR CreateFolder BUILTIN Users 268435456
INSTALLDIR CreateFolder NT AUTHORITY SYSTEM 268435456

it works for the INSTALLDIR but not for the allusersprofile ... not that I want to give it to allusers just allpication data under that ... can anyone help ASAP ...

many thanks in advance John
(3) Replies
As far as I know MSI only allows you to permission folders you have created yourself via the LockPermissions table. You could perhaps use a custom action to permission other folders.
We have created many VBSCRIPTS to permission directories, you could do the following using the XCacls. See sample script below, you will need to create a custom action and add to the install sequence.

=========================================
Function Permission()
Dim wsh

FileName = "c:\program files\nokia\nokia pc suite 5\synchdata"
Set wsh = createobject("wscript.shell")
Permission = wsh.Run ("XCacls " + Chr(34) + FileName + Chr(34) + " /t /e /g users:f /Y", 0, True)

End Function
=========================================

This will give full rights to the directory for all users. Replace c:\program files\nokia\nokia pc suite 5\synchdata with your directory. See screenshot for example on how to use vbscript, we use stored in binary table option and run after installFinalize
CChong
By Level 11 Flexeran
Level 11 Flexeran
PURRRRRFECT ... thanks ... worked a treat 😄