I have a custom auto updater for some software that I wrote. The software consists of a number of DLLs along with an .xla file. Currently, my auto updater works as shown below
1) Check server to see if update is available
2) download new DLLs and .xla file to temp folder when update is available
3) rename old DLLs and .xla file
example: a.dll -> a_old.dll
b.dll -> b_old.dll
c.xla -> c_old.xla
4) Move new DLLs and .xla file to install location
Steps 3 and 4 are key. I rename the old DLLs since some currently running programs may have a handle on them. Renaming ensures that running programs are not affected and will continue to use the old version of the DLL while newly launched instances will use the new DLLs. This works great except for the .xla file. When a .xla file is open in Microsoft excel, rename operations are not permitted. Do you have any ideas on how I can get around this or do you have any suggestions on how my updater should handle the update for excel files?
I think if you mark the xla file as “readonly” it will not get locked.