It's rare to be able to compile an exe that's running. In fact, I think it's only Windows being confused that allows it.

What I do is to compile the program, then I have a program that adds a # to the end (MyProgram.exe gets copied to MyProgram1.exe) & increments that # for successive copies. Then I have the users run a launcher program that checks a table to see what version is now live (MyProgram23.exe or whatever) & then runs that.

This way you can compile any time.