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

Can I Trap Permission Errors?

I'm setting permissions to 2 parent folders our application uses: a client folder and a database folder. In many environments, the database folder has already been created, and all the necessary permissions have been set by their network administrator. When our installation runs, it frequently errors with a failure to set permissions, and displays Retry/Ignore/Cancel options.

I'm getting tired of telling users to just click Ignore. Is there any way to trap those errors and continue with no message to the user?

The installation package is a Basic MSI Project.
Labels (1)
0 Kudos
1 Reply
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

If you are using the ISLockPermissions functionality to set permissions, errors encountered while applying object permissions can be suppressed on a per-object basis by adding the undocumented value 4 to the existing value in the Attributes column (from the ISLockPermissions table in the Direct Editor). This will suppress the error dialog but will still log the error in a verbose log.

Note that this does not apply for permissions set with the LockPermissions and MsiLockPermissionsEx tables implemented by Windows Installer. Errors generated while applying permissions with these tables cannot be suppressed.
0 Kudos