InstallBuilder changes file permission from readonly to writeable after installation on Windows

Comments

1 comment

  • Avatar
    wojciechka

    The <changePermissions> action only applies to Unix. Windows has concepts of file attributes and ACLs. In your case you will need the <changeWindowsAttributes> action:

    <changeWindowsAttributes> <files>${installdir}/${product_key}/modelsim.ini</files> <readOnly>1</readOnly> <ruleList> <fileExists> <path>${installdir}/${product_key}/modelsim.ini</path> </fileExists> </ruleList> </changeWindowsAttributes>

    The action is described in more details in Changing File Attributes section of InstallBuilder user guide.

    Also, ACLs are a much better way to disallow certain users to modify the files - read-only attribute may still be removed, while ACLs work like Unix permissions that they can disallow user or group from being able to modify or read a file.

    It is described in more details in Managing Access Control Lists section of InstallBuilder user guide.

Please sign in to leave a comment.