Question

The installshield LE has deprecated features. Setting file permssions has been disabled. Is there a way to set file permssions. I tried running a post installation exe which uses icacls to set permissions but requires admin privileges to set permissions. Is there a way to grant admin privileges to setup installer. Or, is there a better way to do this.

Was it helpful?

Solution

Manually edit the .isl file

Locate and entry like this:

<table name="File">
    <col key="yes" def="s72">File</col>
    <col def="s72">Component_</col>
    <col def="s255">FileName</col>
    <col def="i4">FileSize</col>
    <col def="S72">Version</col>
    <col def="S20">Language</col>
    <col def="I2">Attributes</col>
    <col def="i2">Sequence</col>
    <col def="S255">ISBuildSourcePath</col>
    <col def="I4">ISAttributes</col>
    <col def="S72">ISComponentSubFolder_</col>
    <row><td>myfile.sdf2</td><td>ISX_DEFAULTCOMPONENT6</td><td>LottoDB.sdf</td><td>0</td><td/><td/><td>0</td><td>1</td><td>C:\Users\Mauro\Documents\Visual Studio 2012\Projects\MySolution\MayProject\MyFile.sdf</td><td>1</td><td/></row>
</table>

...where MyFile.sdf is the file whose permissions must be set.

Next, locate an entry like this (or add it):

<table name="ISLockPermissions">
    <col key="yes" def="s72">LockObject</col>
    <col key="yes" def="s32">Table</col>
    <col key="yes" def="S255">Domain</col>
    <col key="yes" def="s255">User</col>
    <col def="I4">Permission</col>
    <col def="I4">Attributes</col>
    <row><td>myfile.sdf2</td><td>File</td><td>[%USERDOMAIN]</td><td>Users</td><td>1610809791</td><td>0</td></row>
</table>

Note the the column Name in table File corresponds to column LockObject in table ISLockPermissions.

Permissions 1610809791 is "Write".

OTHER TIPS

Read my "Augmenting InstallShield" blog series:

Here is one similar example:

Augmenting InstallShield using Windows Installer XML - Certificates Augmenting InstallShield using Windows Installer XML - Windows Services

The concept is you leverage most of the free abilities of InstallShield Limited Edition along with injecting some additional free abilities of Windows Installer XML. In this case you'd author a wxs file that has a Permissions element for the directory. Once you build your MSM in WiX you add it to your ISLE project and associate it to a feature and directory. ( Right click the module and select properties then select INSTALLDIR from the drop down. )

This is not supported by the limited edition.

A solution is to use a different setup authoring tool which allows setting file permissions or at least running deferred custom actions with no impersonation. Perhaps this list will help: http://en.wikipedia.org/wiki/List_of_installation_software

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top