Add write permission to Custom folder files created with windows installer

前端 未结 1 679
生来不讨喜
生来不讨喜 2020-12-22 04:13

I am creating a folder inside programdata folder using windows installer. Running the project i am getting an error while trying to write to the file

C:\\Pr         


        
相关标签:
1条回答
  • 2020-12-22 04:51

    ACL Permissioning: Adding write permissions for regular users is usually considered an anti-pattern, but sometimes you need to share a file among all users of the PC for pragmatic purposes.

    Write Access: For the record: Here is a list of approaches to deal with permission denied issues. Most of the options listed are not good at all - and that is why the list was made - we need to remember why they are bad and what alternatives exist.

    Deployment Tool: Application of custom ACL permissioning - to open a file in a protected disk location for writing by all users - is different depending on what tool you use to make your MSI. Since you don't specify WiX, Installshield, Advanced Installer or something else I am not sure how to answer. Let me use links instead:

    WiX:

    • Different WiX permission elements - there are two different PermissionEx elements (!)
      • PermissionEx (Util Extension - WiX's own stuff)
        • Util Version: Wix: How to set permissions for folder and all sub folders
      • PermissionEx (MSI5 only - uses the built in MsiLockPermissionsEx Table)
        • MSI5 Version: How to deny folder permission to Users with wix installer
    • There are two more (do not use):
      • Permission (legacy MSI LockPermission table)
      • FileSharePermission (for share permissioning - use when you need share permissioning)

    Installshield:

    • Configuring Permissions for Files and Folders
    • Setting Permissions in Windows Installer: MSILockPermissionsEX and ISLockPermissions
    • Installshield Folder Permissions not working

    Advanced Installer:

    • Apply permissions by right clicking a folder and going to properties: Permission Dialog.
    • It seems this uses the old, legacy LockPermission table.

    There are some other tools as described here: Short List. Secondary (more links).


    Other Links:

    • Different Ways of Giving Permissions in Your Windows Installer
    • Per Machine App Registration
    • Create a .config folder in the user folder
    • Desktop applicaton not opening after installation in client system
    • http://wixtoolset.org/documentation/manual/v3/xsd/wix/permissionex.html
    0 讨论(0)
提交回复
热议问题