I have an internal intranet application as a exe file (win32, written in Delphi).

I regularly update it with new features and patches.

Many people are accessing the same exe (using it with remote desktop).

In Windows Server 2003 to replace the file I just needed to:

rename the old file, copy the new file.

This is not possible in 2008 anymore since because of same caching the new file doesn't work. It runs but then there are problems (probably linked to the way Delphi uses the exe resources). The only way is to close all the users sessions and replace the file.

May you suggest a method that works? Simple if possible? Is it possible to disable this caching? Or any other trick that allows me to replace a file (without changing the full path).

link|improve this question

Yes it is a duplicate but I was hoping for some other suggestion. By in win2003 i achieved the correct result, and it was saisfing for me. – PressPlayOnTape May 10 '11 at 15:21
4  
And now Windows is enforcing proper procedure for great justice. – Chris S May 10 '11 at 15:24
feedback

2 Answers

up vote 4 down vote accepted

As an alternative, you could create a new launcher that never changes. It will read which version of the executable to start, and start the updated version.

So if the end-user shortcuts point at filename.exe, then that is what you would name your launcher, the launcher might read the file filename.versions, then execute filename.version.exe.

link|improve this answer
feedback

Schedule a maintenance window and replace the file when there are no users working with it. Just because Server 2003 allowed you to get away with doing something the wrong way, doesn't mean 2008 should.

The part where you mention this:

The only way is to close all the users sessions and replace the file.

is the right way to go about it.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.