Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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).

share|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. –  user193655 May 10 '11 at 15:21
5  
And now Windows is enforcing proper procedure for great justice. –  Chris S May 10 '11 at 15:24

3 Answers 3

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.

share|improve this answer
    
I did launcher and it works great, launcher simply reads from ini file the path of the exe to run so I use "oddfilenames" like "Application20130112_v1.exe" and I rule. I just need to write in the ini file the correct path. –  user193655 Jan 9 '13 at 8:43

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.

share|improve this answer

I guess if you use UPX compressor, you'll be able to remove the executable. Once the .exe is decompressed on the ram.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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