Inno Setup - 如何设置文件夹的完全权限,而不仅仅是它的内容 [英] Inno Setup - How to set full permission on a folder, not just for it's contents

查看:28
本文介绍了Inno Setup - 如何设置文件夹的完全权限,而不仅仅是它的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Inno Setup 创建的工具包将我的应用程序安装在 C:Program FilesMyApp 中.

My kit created with Inno Setup installs my application in C:Program FilesMyApp.

当我的应用程序启动时,它尝试在 C:Program FilesMyApplogs 中创建新的日志文件,但它失败了.

When my application starts, it tries to create new log files in C:Program FilesMyApplogs but it fails.

在我的 Inno 脚本中,我有以下设置:

In my Inno script i have the following settings:

[Dirs]
Name: "{app}";

[Files]
Source: logs*; DestDir: {app}logs; Flags: ignoreversion recursesubdirs createallsubdirs; Permissions: everyone-full

这对 logs 文件夹中的所有文件提供完全权限,但不对文件夹本身提供完全权限.因此,当我的应用程序尝试在该文件夹中创建新的日志文件时,它失败了.

This gives full permissions on all files inside logs folder, but not on the folder itself. So, when my application tries to create a new log file inside that folder, it fails.

如何设置文件夹的完全权限,而不仅仅是文件夹中的现有文件?

How can i set full permissions on the folder as well, not only on the existing files in it?

推荐答案

为 [Dirs] 部分下的 logs 文件夹设置权限对我有用:

Setting permissions for logs folder under [Dirs] section worked for me:

[Dirs]
Name: "{app}"; 
Name: "{app}logs"; Permissions: everyone-full

[Files]
Source: logs*; DestDir: {app}logs; Flags: ignoreversion recursesubdirs createallsubdirs; Permissions: everyone-full

但是,如这篇文章,我不确定这样做是否正确.

But, as in this post, i'm not sure if it's the proper way to do it.

这篇关于Inno Setup - 如何设置文件夹的完全权限,而不仅仅是它的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆