如何设置动态链接文件的权限?
我有一个 InstallScript 安装程序,它利用多个组件的动态文件链接。这些组件包含标准用户应该能够编辑的配置文件。我们最近发现,当这些文件安装在 Windows Server 08 上时,权限被设置为管理员组的完全访问权限,但只能读取和读取。执行用户组的访问权限。典型的安装位置是 C:\programName。
我尝试以管理员身份在 C:\programName 目录中手动创建新文件(右键单击 - 新文本文件),并且它们是使用相同的权限生成的。我假设这只是新文件的标准权限设置。
在InstallShield中,有什么方法可以设置动态链接文件或包含它们的目录的权限吗?
我在组织中查找了权限设置
- ->组件
- 应用数据->文件和文件夹,
但我没有找到任何东西。有关动态文件链接的文档没有提及权限。
我们正在使用InstallShield 2010。
I have an InstallScript installer that utilizes dynamic file links for several components. These components contain configuration files that standard users should be able to edit. We recently discovered that when these files are installed on Windows Server 08, the permissions are set to full access for the Administrators group, but only read & execute access for the Users group. The typical install location is C:\programName.
I've tried creating new files manually as an admin (right click - new text file) in the C:\programName directory, and they are generated with identical permissions. I'm assuming that this is just the standard permission setup for new files.
Is there any way, within InstallShield, to set the permissions for dynamically linked files or the directory containing them?
I've looked for permission settings in
- Organization -> Components
- Application Data -> Files and Folders
but I haven't found anything. The documentation on dynamic file links makes no mention of permissions.
We are using InstallShield 2010.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一般来说,这些权限是一件好事;它们是从其父文件夹继承的。非管理员用户(包括接受 UAC 提示之前的受限访问管理员)应该无法修改
Program Files
或C:
下的文件,因此我建议解决此问题您的应用程序(例如通过使用每个用户的文档文件夹)。由于您没有谈论为什么需要它,因此很难确定这是否适用于您的情况。如果事实证明在安装而不是应用程序中解决这个问题确实有意义,您可以使用 SetObjectPermissions API 以编程方式设置权限。
Generally these permissions are a good thing; they're inherited from their parent folders. Non-administrator users (including the limited access admin before accepting a UAC prompt) should be unable to modify files under
Program Files
orC:
so I would suggest addressing this concern in your application (for instance by using each user's Documents folder). Since you don't talk about why you need it, it's hard to say with certainty if this applies to your case.If it turns out it does make sense to address this in the installation instead of the application, you can use the SetObjectPermissions API to set permissions programmatically.
在“文件和文件夹”页面中右键单击文件或文件夹,选择属性,然后单击权限按钮。在“权限”对话框中,您可以右键单击名称列表,然后使用新建上下文菜单选项添加新权限。
如果该选项不适用于某个文件,您可以尝试在父文件夹上设置它。
In "Files and Folders" page right-click the file or folder, select Properties and click the Permissions button. In the "Permissions" dialog you can then right-click in the Name(s) list and use the New context menu option to add a new permission.
If the option is not available for a file, you can try setting it on the parent folder.