Archive: Installed exe cannot modify its own software files


Installed exe cannot modify its own software files
I have created an installer with NSIS for my java application. After install and startup of the application, the application tries to update itself ( override application lib jars with jars downloaded from internet ) . This operation fails because Windows does not allow this. Which settings should I change in NSIS to make this possible ?


Several options.
1) Modify your app to demand admin level.
2) Install to a world-writable or BU-writable directory, for example $APPDATA under shellvarcontext all (not sure how to check world-writability for a user-defined path, but shouldn't be impossible)
3) Make install directory BU-writable (dangerous - protected directories are protected for a good reason, you shouldn't remove it)

My suggestion is to use option 2, installing to $APPDATA under all-user context. You could of course also install to any directory and put only the lib jars in $APPDATA.