5

My App will be initially deployed with Windows Installer.

The key characteristics of the solution I am looking for include:

  • Support silent update while app is running (or automatically restart client)

  • Easy to maintain and manage packing process

  • Avoid complex customizations or installation scripts

Do you have any ideas on how can I achieve this? Even if it means to modify the app code to support any idea.

Application is .net 2.0

3 Answers 3

5

Have you considered using ClickOnce for deployment? It has a facility to programatically check for updates and optionally force them to be installed - see http://msdn.microsoft.com/en-us/library/ms404263.aspx

3
  • My app is a desktop client, and I don't think click once can be a viable option for deployment in the first place. Nov 18, 2010 at 15:51
  • 1
    +1 - ClickOnce can absolutely be suitable for desktop deployment. Just set the update path during your ClickOnce deployment to an URL, for instance, then your application will try to connect to this URL on startup so that it can check for updates. Nov 18, 2010 at 15:55
  • The deployment url does not need to be a URL. It can be a UNC path. You can set the clickonce installer to always check and the users will get the new version whenever they restart the application. Nov 18, 2010 at 17:01
2
  • You can silently update your application by using the Restart Manager (available in Vista and Win7).
  • Don't forget that a user is not alway the administrator. Since Vista if you sign your Windows Installer package you can update the application without needing administrator rights from the current user.
  • For all this to work you need to install your application using the Windows Installer technology. You can use Wix to create an xml file and compile it to an .msi package. Wix integrates nicely with VS.
1

The Proxy Design Pattern will help you achieve this while this is the pattern used for plugins.

Another short explanation is with the Gang of Four - Proxy Design Pattern.

Having an eye out the Shadow Copying of assemblies is definitely useful for the trick, as you shadow copy your updated assembly to your application assemblies folder, then you can make your application aware of changes, then unload the old assembly and load the new one for the changes to take effect, that is, without even having to restart your application, and this will be absolutely transparent for the end-user.

A more simple approach might be the ClickOnce Deployment which you might be interested to read about following the sugested link.

1
  • Can you explain better how can this pattern help me? Nov 18, 2010 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.