Upgrading ADX-based add-ins in Windows Vista

Add-in Express™ Support Service
That's what is more important than anything else

Upgrading ADX-based add-ins in Windows Vista
 
Esteban Astudillo


Guest


Hi all,

I'm wondering if somebody could share their strategy to upgrade ADX-based add-ins using .Net 2.0 in Windows Vista.

I've built an automatic upgrade routine in my add-in that when used in Windows XP machines it works quite well. However, this same technique doesn't work all the time in a Windows Vista machine because of the new security constraints. The updating process doesn't have enough privileges to replace files under the "Program Files" folder and the user is not prompted to allow the operation either.

I looked at the documentation of new ClickOnce feature introduced in ADX 3.3. It looked really promising, but it lacks some of the features I managed to implement, like detecting automatically if there is a new version, downloading it in the background, and replacing the files in a transparent way to the user. If I understand it correctly, ClickOnce requires the user to manually check for updates on a regular basis or after I let them know by email or otherwise.

Is anybody else using a different upgrading strategy? Would Sergey or somebody else in ADX share some thoughts on how to get around the security limitations introduced with Windows Vista?

Thank in advance for your comments

Esteban
Posted 11 Jul, 2007 10:20:20 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Esteban.

Please try to use the CheckForUpdates method of the add-in module to check if there is an update on the server. You can schedule this process in the add-in code while the host application is running. Now it shows the message box if the update is ready. I will improve this method to make it working in the background.



P.S. We always do our best to answer your forum requests as soon as possible. However, we apply the rule "first in first out" with Premium Support Service subscribers taking priority. Please understand it may take us some time to do research on the issue. Please be assured we will let you know as soon as the best possible solution is found.
Posted 11 Jul, 2007 10:31:17 Top
Esteban Astudillo


Guest


Hi Sergey,

So, in your opinion I should give a try to the ADX built-in mechanism to apply automatic updates, right?. I can see what you mean by automating the call to the CheckForUpdates method. I would certainly take a closer look at it, thank you for the clarification.

Before going that path though, I'd like to explore the reasons why I can't "replace" the add-in code in place in Vista or how you managed to do it if you can share some of that information (links to some documentation perhaps?).

On top of spending the extra time getting familiar with ADX's ClickOnce features, I'm also concerned with some other features I implemented in my otherwise working solution.

For example, one of them is security. How do you control that no other "man in the middle" attacker replaces one of the update packages with some malicious code that then it will be loaded by the host application? There is also the problem of leaving the update file publicly visible in a website: if I understand correctly, the ADX "updater" will do an HTTP retrieve (GET?) from a given location, but I didn't see any server-side code to "protect" this access, so I'm assuming is out in the clear.

Maybe these are not of a concern for your solution because you manage security in a different way (?)

Really looking forward to hear from you, whether for Vista security tips or for more information about ADX ClickOnce, or both ;)

Thanks in advance

Esteban
Posted 11 Jul, 2007 11:23:03 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05

Esteban, please read the following document to learn on how you can make your application compatible with Vista:
http://www.microsoft.com/downloads/details.aspx?familyid=ba73b169-a648-49af-bc5e-a2eebb74c16b&displaylang=en

As to the ClickOnce technology implemented in Add-in Express, please visit the following link:
http://msdn2.microsoft.com/en-US/library/t71a733d(VS.80).aspx
Posted 11 Jul, 2007 11:35:20 Top
Esteban Astudillo


Guest


Thank you Sergey
Posted 11 Jul, 2007 13:18:52 Top
Mike Arrington


Guest


Have any changes been implemented in the CheckForUpdates method to allow for more transparent functionality? Specifically can all the messages/dialogs be surpressed and/or replaced with custom dialogs?
Posted 23 Oct, 2007 09:15:39 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Mike.

We decided not to implement the transparent functionality at all. The fact is that this approach may cause runtime issues associated with the add-in functionality. For our opinion, the old add-in should be unregistered completely before the installer installs a new version. Of course, the host application should be closed. These steps can't be performed without the user interaction.
In the next build of Add-in Express we will introduce automatic updates. All updates will start before the application (adxlauncher.exe) is loaded and will be managed by the ClickOnce service. So the users will get the standard ClickOnce update dialog with three buttons: Update, Skip and Close (the X button). As to the CheckForUpdates method, it will have the same signature and will run the standard ClickOnce updater automatically.
If there are any updates on the server, the adxlauncher application will ask the user to close the host application in order to finish the updates correctly.

We are also planning to localize the ClickOnce dialogs. It will be done in subsequent releases.
Posted 23 Oct, 2007 09:56:56 Top