Gary Garside
Posts: 15
Joined: 2012-10-19
|
Hi,
We're suffering from a bit of an issue that I hope someone else has managed to deal with in the past. Our app is pretty much finished. The addon itself functions fine and we've recently nailed the installation/update process using the ClickTwice web installer.
One of our clients requests was to open a webpage on install ("Thanks for installing,...") and a webpage on uninstall ("We're sorry to see you go,..."). I wrote these via a custom installer class for the which the project output is handled via custom actions in the installer.
The problem I now have is that when checkForUpdates detects a new version and the user downloads and installs it, in removing the old version my uninstall custom action fires and launches the "We're sorry to see you go" webpage.
Is there anyway I can check get the Installer class to check if the current process is an upgrade, rather than an actual uninstall?
Here's my Uninstaller class code, i've changed the urls for obvious reasons:
<Security.Permissions.SecurityPermission(Security.Permissions.SecurityAction.Demand)>
Public Overrides Sub Install(ByVal stateSaver As System.Collections.IDictionary)
MyBase.Install(stateSaver)
End Sub
<Security.Permissions.SecurityPermission(Security.Permissions.SecurityAction.Demand)>
Public Overrides Sub Commit(
ByVal savedState As System.Collections.IDictionary)
MyBase.Commit(savedState)
System.Diagnostics.Process.Start("iexplore.exe", "www.installpage.com")
End Sub
<Security.Permissions.SecurityPermission(Security.Permissions.SecurityAction.Demand)>
Public Overrides Sub Rollback(ByVal savedState As System.Collections.IDictionary)
MyBase.Rollback(savedState)
End Sub
<Security.Permissions.SecurityPermission(Security.Permissions.SecurityAction.Demand)>
Public Overrides Sub Uninstall(ByVal savedState As System.Collections.IDictionary)
MyBase.Uninstall(savedState)
System.Diagnostics.Process.Start("iexplore.exe", "www.uninstallpage.com")
End Sub
Many thanks in advance,
Gary |
|
Sergey Grischenko
Add-in Express team
Posts: 7233
Joined: 2004-07-05
|
Hi Gary,
That is why I have already added the ClickTwiceModule class to upcoming release of Add-in Express. The new release will be published this month. Can you please wait a couple of weeks? |
|
Gary Garside
Posts: 15
Joined: 2012-10-19
|
Hi Sergey,
Thanks for the upd ate. That sounds great, and I look forward to the update release.
Does the update also have the functionality to enable the se tup.exe internally download the projectname.exe file, rather than open a browser window, as mentioned elsewhere in the forum?
Kind Regards,
Gary |
|
Sergey Grischenko
Add-in Express team
Posts: 7233
Joined: 2004-07-05
|
Hi Gary,
No, setup.exe is still built via msbuild task. |
|
Gary Garside
Posts: 15
Joined: 2012-10-19
|
Ok, thanks for the quick response, Sergey :) |
|