Reputation: 67
In NSIS is there any way to identify whether the application file is modified from the user side while updating the application using installer?
My requirement is while updating the application, we need to give warning message in case of user modify the application file. If 'Yes' we need to update the file, otherwise we should not update.
Upvotes: 0
Views: 192
Reputation: 1
Use archive attribute. Archive attribute is there especially for such purpose.
Below steps demonstrates the behaviour of archive bit:
Note that archive bit of the file is set, signalling that this file is modified.
So the method will be like this:
Upvotes: 0
Reputation: 101756
You probably have two options; you can get the modified time with GetFileTime
or use something like the MD5 plugin (md5dll::GetMD5File
).
You could save the original values in a .ini when you install and then compare with these values when updating...
Upvotes: 2