1

installshield LE 具有已弃用的功能。设置文件权限已被禁用。有没有办法设置文件权限。我尝试运行使用 icacls 设置权限但需要管理员权限来设置权限的安装后 exe。有没有办法授予管理员权限来设置安装程序。或者,有没有更好的方法来做到这一点。

4

3 回答 3

2

阅读我的“Augmenting InstallShield”博客系列:

这是一个类似的例子:

使用 Windows Installer XML 增强 InstallShield - 证书 使用 Windows Installer XML 增强 InstallShield - Windows 服务

这个概念是您利用 InstallShield Limited Edition 的大部分免费功能以及注入一些额外的 Windows Installer XML 的免费功能。在这种情况下,您将编写一个 wxs 文件,其中包含目录的 Permissions 元素。在 WiX 中构建 MSM 后,将其添加到 ISLE 项目并将其与功能和目录相关联。(右键单击模块并选择属性,然后从下拉列表中选择 INSTALLDIR。)

于 2012-03-14T15:14:30.600 回答
1

手动编辑 .isl 文件

像这样定位和输入:

<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>

...其中 MyFile.sdf 是必须设置其权限的文​​件。

接下来,找到这样的条目(或添加它):

<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>

请注意,表 File 中的列 Name 对应于表 ISLockPermissions 中的列 LockObject。

权限 1610809791 是“写”。

于 2013-05-03T15:23:25.503 回答
0

限量版不支持此功能。

一种解决方案是使用不同的设置创作工具,该工具允许设置文件权限或至少运行延迟的自定义操作而无需模拟。也许这个列表会有所帮助: http ://en.wikipedia.org/wiki/List_of_installation_software

于 2012-03-14T13:25:29.790 回答