views:

29

answers:

1

I use install shield to update application.

I have ws2003 server, multiple users can access at the same time.

When other users run my application I can run upgrade process, Install shield recognize that files are locked and creates temporary version of new files (these are app.configs, automatically generated during installation) in application directory. It should replace these files after computer restart, however when I run computer again temporary files disappear and new version of files are empty, so my application crash.

It is strange because sometime ago I tried this mechanism in other application but there I replaced simple dll file and it worked.

What can I do to overcome this issue ?

+1  A: 

A very simple solution is to use two executable (or a batch file and an executable). The first exe/batch looks for new versions of the files and renames them and then starts the real exe.

Aaron Digulla
Thanks for your answer, however I have a question. What exactly is the suggested process: I understand that I should use two executables during upgrade, but what exactly should first version do ?
Darqer
The first exe replaces the files which are locked by the second exe. So you can download them in the second exe, start the first again and exit. It will replace the (now unlocked) files and start the second exe. Note that the second exe can upgrade the first exe since it's not used anymore when you start an upgrade. If you use a BAT file, use `start` to run the second exe in the background.
Aaron Digulla

related questions