I am using XP Unlimited to allow users do Remote Desktop on a Windows 7 machine.
The users run on remote desktop a native win32 exe Application (built with Delphi).
When I need to update the exe file and all users log off from remote desktop everything works fine, but when I have to update the exe file "live" when some users are using it I have a bad behaviour:
somehow the exe is cached and I have Access Violation errors.
To replace live I rename the old exe and I copy the new one in the folder.
Does this problem tell you something? Can it be that the problem I am facing is because I am using a non server OS (Windows 7 instead of win 2k8)? Could you suggest a solution or explain me the problem.
Thanks.
Short answer: DON'T CHANGE FILES THAT ARE CURRENTLY IN USE OR RUNNING IN ACTIVE MEMORY.
If the file is open and in use, you're going to have problems. Pulling a file out from under the operating system/application while there are open file handles is a big no-no. I'm surprised it would even let you rename the file.
It's not necessarily caching something, you have active applications running that don't assume the files will be changing without notification.
This is why often Windows forces you to restart for certain updates, many updaters for software force you to close your browser or other "related" programs (Java comes to mind) to finish updating, or other updaters "restart" the program they're updating (like Adobe installers).