Take the 2-minute tour ×

We have an inhouse application Fattracs that is used by 10-30 users over Citrix. All users have starts an own instans. The exe-file resides on several servers with Windows 2003 R2 that is loadbalanced by Citrix. When a new version arrives the exe-files must be changed. If there is only a few users it used to work to change the exe-file on the fly. New users then got the new versions and existing users have to restart to get it. But with many users Windows may somehow lock the exe-file. Then we have to kick out all users before the change.

Someone who knows the reason and even better how to solve it ? We have some fileshares to the directory for exes as we don't want to use Remote desktop all the time for access it. Does it mean anything ?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Use the command "net file" on the server hosting the shared file to see what users have the file open.

Use the command "net file /close" on the same box to force any session returned by the first command to be closed.

Then you will be able to update the file.

C:\Users\tf>net file /?
The syntax of this command is:

[id [/CLOSE]]

Alternatively use the Shares section in Computer Management to achieve the same thing.

share|improve this answer

You can use handle to find who is locking the files. And even to remove the lock. Alas, its not a safe operation. Maybe the user who is running the application will dynamically load a dll that you have just replaced with an incompatible version. I don't thing that it is related to the share ( the handle utility will tell you about it ) and I don't know of a solution to this:-(.

share|improve this answer

Look at what GNU Emacs does.

When it starts up, it looks for a newer version; a emacs-version.exe where version is newer than the current version. Then they install emacs.exe and emacs-version.exe and only complain if the latter can't be installed.

For in-house stuff, if you don't have versions, simply consider looking for main-1.exe, and failing that main-2.exe and so on, and simply create a new file whenever it's installed. The make main.exe search for the highest-numbered version.

Your installer could also remove older main-N.exe files, if you like.

share|improve this answer

Your Answer


