The problem happens on Windows, I have files that are readonly, but after installation, the file permission is changed to writeable. How can I preserve the file permission on Windows?

asked 15 Mar '13, 15:08

gt8967884's gravatar image

accept rate: 12%

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.


answered 16 Mar '13, 06:12

wojciechka's gravatar image

wojciechka ♦♦
accept rate: 26%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 15 Mar '13, 15:08

Seen: 1,544 times

Last updated: 16 Mar '13, 06:12