PDA

View Full Version : Write to an ini file and then set its attribute to read-only



bertilh
05-16-2002, 02:04 AM
Hi,

Actually I have 2 questions:

1.

I have a program that I customize via a transform file. The transform modifies entries in an ini file.

The ini file should then be set as read-only so that users are not able to modify its content.

I cannot set the file as read-only in the transform, otherwise the ini file cannot be modified during install, which is logical.

I was wondering if there is a standard way of changing the file attributes after the ini file has been modified?

What I have done is create a custom action that is executed after the writinifile action, to change the file's attributes. Is this the only way of doing?


2.

When I uninstall the product, I get a 1913 error because the ini file is read-only and cannot be modified. But why does the setup tries to modify the ini file during uninstall?

Any help would be appreciated. Thanks.