I'm having an issue where the folder that is created and my software installed into is locked on Window's 7. This is then preventing the software I'm installing from writing to it's data file in that directory. Is there something I have set incorrectly in the installer settings?

asked 01 Nov '11, 22:50

TxRobNLa's gravatar image

TxRobNLa
1111
accept rate: 0%


If I understand properly, the problem is that your installer is being installed with administrator rights and the application is unpacked into a directory without permissions for regular users. If that is indeed the issue, would be possible to configure your application to write the data file into the user personal directory? Another possibility could be to create a shortcut to your application configured with

 <createShortcuts>
    <destination>${windows_folder_desktop}</destination>
    <shortcutList>
      <shortcut>
        <comment>Launches ${project.fullName}</comment>
        <name>Launch ${project.fullName}</name>
        <runAsAdmin>1</runAsAdmin>
      </shortcut>
    </shortcutList>
  </createShortcuts>

Or you could grant write privileges to all users over the data file:

<setWindowsACL>
  <action>allow</action>
  <files>${installdir}/data/datafile</files>
  <permissions>generic_all</permissions>
  <users>S-1-1-0</users>
</setWindowsACL>

You can find additional details about the usage of the <setWindowsACL> action here.

link

answered 02 Nov '11, 06:01

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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

Tags:

×33
×9
×4

Asked: 01 Nov '11, 22:50

Seen: 1,623 times

Last updated: 02 Nov '11, 06:01