Archive: User cant modifiy the files after installed?

User cant modifiy the files after installed?
I have compared two files and stored mismatched values in the temporary file.After that read the values from temporary file and replaced in original file.
I have used following code

page custom twofilecompare
page custom originalwrite
Function twofilecompare
FileOpen $0 "$INSTDIR\" "r"
FileOpen $1 "$INSTDIR\" "r"
FileOpen $R0 "$INSTDIR\" "w"

FileRead $0 $2
${If} $2 == "$\r$\n"
Goto loop
FindClose $0

FileRead $1 $3
IfErrors done
strcmp $2 $3 loop here
FileWrite $R0 $2
Goto loop

FileClose $0
FileClose $1
FileClose $R0

Function originalwrite
IfFileExists "$INSTDIR\" 0 filenotfound
FileOpen $0 "$INSTDIR\" "r"
FileRead $0 $1
IfErrors done
//do some stuff

FileClose $0
MessageBox MB_OK "file not found"

After installed I cant edit original and backup property file.If i try to modify a prompt box display as
"please check if this file opened another program".But i have closed all files.
How to find file is closed or not ?
How to solve this problem?

You've got FindClose $0 in there - I'm guessing that should be FileClose?


Thanks.but i think no need for Findclose or Fileclose in that place.beacause i have closed all files in done section.

Yes, I was thinking the same thing.

Are you sure you've closed all open files? Try putting a messagebox after the fileopen commands, echoing the handles in $0 $1 and $R0. Then when you close them, put the same messagebox and check whether those registers still contain the same file handles. Maybe you accidentally changed the registers somewhere..