Girish Chandran C
Girish Chandran C

Reputation: 111

How to set ini file attributes during an Inno install

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?

Upvotes: 2

Views: 2065

Answers (1)

Deanna
Deanna

Reputation: 24283

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.

Upvotes: 1

Related Questions