-2

I am trying to find a good way to implement updating an application on a shared folder. If there is an update to the program I need to uninstall and reinstall the program on the shared folder. What is the best way to go about this in order to inconvenience the users the least? Edit: I am using windows 7 Thanks

1 Answers1

3

I'll restate your question to verify my assumptions: You've developed an application that's going to be accessed by multiple users by way of running the EXE from a shared folder. You'd like to have a strategy for updating the EXE even when users might be using the application (when the EXE will be locked can cannot be replaced).

The strategy I'd employ would involve having the application launch a child process. You could handle that a couple different ways, both involving the user executing a "launcher" program that then executes the "real" application as a child process. (I'd have the launcher program block until the child process exits, just to be friendly to sysadmins who might want to execute your program via scripts and want the script to block until your program exits.)

Here are a couple of ideas for how that "launcher" program could work:

  • The "launcher" locates the most current application executable in the shared folder and executes that as a child process.

  • The "launcher" copies the application executable from the shared folder to the user's %TEMP% folder (unless the copy already cached there has a matching date/time and size, etc, as compared to the most current application executable in the shared folder).

Either of those strategies would let you deploy new EXEs while users are using the program. You're, effectively, just shifting the burden of difficult replacement to the "launcher" program which, hopefully, will not need frequent replacement.

Evan Anderson
  • 141,071
  • 19
  • 191
  • 328