How would you run an application off a network share so you can update application?

7,793

Solution 1

My preferred method, two applications. The main app you already have. The second is a launcher/updater. Make a shortcut to the launcher, it checks a config setting (encrypted gibberish, xml, plain text, hard-coded directly into the launcher, whatever) for the path of the executable to launch then launches it. Once the main app is launched, the loader will terminate.

Whenever you get a new version, you update the config file of the launcher and future program launches will then open the new version.

It is the "boot loader" style process. Have a tiny assistance app that points to the full sized app. Clients launch the tiny app and it then directs them to the proper full app.

Bonus points if you have your launcher check hash fingerprints or signatures on the full sized apps to ensure no one gets creative and tries to link to another app from the launcher.

Solution 2

Sounds like a legacy application. Your best bet is going to be to not over complicate it, and just schedule downtime for updates.

Solution 3

I agree with DanBig and TheCleaner. We have an internal app like that. The shortcut goes to \\server\share\application\application.exe, and when we need to do updates, I wait until the users go home for the day, and use Server Manager or Computer manager to close the open files so new ones can be copied.

It's not pretty, but anything else is uglier, IMHO.

Solution 4

I agree with DanBig that in your simple situation unless you want to revamp it a lot (like Ruscal suggests, which is a good idea) just schedule an "outage" where you kick the file lock(s) and replace the .exe file (maybe overnight or on a weekend).

"I would like to put a shortcut on the user desktops which point to the newest version of the application" - OP

As far as getting them on the desktop, why not have your shortcut point to z:\Apps\ApplicationX\ and place the current EXE there. Then have subfolders for past revisions/versions as necessary like z:\Apps\ApplicationX\revisions. This way the client shortcut never changes, and during updates you simply move the existing exe into a rev# folder and place the new/updated .exe into the z:\Apps\ApplicationX\ folder.

Share:
7,793

Related videos on Youtube

Srikanth
Author by

Srikanth

Updated on September 18, 2022

Comments

  • Srikanth
    Srikanth over 1 year

    We have an internal desktop application which we have deployed to a network share. In that directory are subdirectories for each version, ie, z:\Apps\ApplicationX\1.0 z:\Apps\ApplicationX\2.0 z:\Apps\ApplicationX\2.1

    I would like to put a shortcut on the user desktops which point to the newest version of the application. My current solution is to put the current version into a directory called "z:\Apps\ApplicationX\Current", and put a shortcut on their desktop to the exe there.

    The problem is that when they are running the application, I can't update the application because the file is locked.

    I tried changing the shortcut to point to a batch file which copies the file locally and then runs it from there, but we're all on Windows 7, and UAC is causing issues copying the file to the C: drive where I would expect it to be installed.

    I suppose I could copy the executable to the users home drive and run it from there, but I don't like the idea of having an executable in the users home drive. It also means that there are multiple copies of the application on the network, which I'm not a fan of.

    I also thought that I might be able to have a shortcut to a shortcut and I would just update the shortcut, but that doesn't work either.

    My current solution is to have a batch file which has the start command in it pointing to the current version, and a shortcut to that batch file.

    Does anyone else have possible solutions?

  • Srikanth
    Srikanth over 10 years
    It's a demo for now, and we want to be able to push whenever we want. There are quite a few demo users though so going around getting people to shut down the app is painful.
  • DanBig
    DanBig over 10 years
    That's why you schedule it at night, and kill the open processes if they are still open during your maintenance window.
  • Srikanth
    Srikanth over 10 years
    That's what I basically did, except I just created a batch file.