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

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

问题描述

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

My kit created with Inno Setup installs my application in C:\Program Files\MyApp.

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

When my application starts, it tries to create new log files in C:\Program Files\MyApp\logs\ 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天全站免登陆