如何在Inno安装过程中设置ini文件属性 [英] How to set ini file attributes during an Inno install

查看:167
本文介绍了如何在Inno安装过程中设置ini文件属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以使用inno设置为ini文件设置文件权限吗? 在安装时,我需要向ini文件中写入一些值,然后将permision设置为只读.在卸载期间,我需要读取文件并将permision更改为写入模式,并将一些数据写入ini文件,然后再次需要将权限设置为只读.有人可以帮忙吗?

Can we set file permission for an ini file using inno setup? At the time of instalation, i need to write some values to a ini file and then set the permision to read only. And during uninstalation, I need to read the file and change the permision to write mode and write some data to ini file and then again i need to set the permission to read only. Can anyone help please?

推荐答案

您可能需要在[Code]中设置文件许可权,也许使用[Ini]条目的BeforeInstallAfterInstall参数.可以使用Windows SetFileAttributes() 设置属性. API函数.

You will need to set the file permissions in [Code], maybe using the BeforeInstall and AfterInstall parameters of the [Ini] entry. The attributes can be set using the Windows SetFileAttributes() API function.

这篇关于如何在Inno安装过程中设置ini文件属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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