I have an addin (Outlook) and set the Updates option to "Never check for updates" and deployed it via Clickonce - locally.
At first i received "User has refused to grant required permissions to the application."
I then found to overcome this problem is to run the below script:
caspol -m -ag 1 -url "http://localhost/ApplicationName/*" FullTrust -exclusive on
The error message above now disappears.
I then publish a new update to the same location, close outlook 2007, open Outlook 2007 and receive "The customization cannot be installed because another version is currently installed and cannot be upgraded from this location."
Im trying to have a button which allows the user to check for updates, rather than the system. If an update is available then the user can decide if they need to install it or not.
The code i have to check for updates (but NOT install them yet) is:
Public Shared Function NetworkDeployed() As Boolean
Return ApplicationDeployment.IsNetworkDeployed
End Function
Public Shared Function UpdateInformation() As UpdateCheckInfo
If NetworkDeployed Then
Return ApplicationDeployment.CurrentDeployment.CheckForDetailedUpdate
End If
End Function
I believe this code is correct, but i would like to know how to overcome the error "The customization cannot be installed...." but not by uninstalling the original installation, or how to work around it or if i have done this incorrectly i would like to know the correct procedure?
Secondly i would like to know if i have to execute the caspol script on a PC for it to become trusted, how could i do this either via code or how would i configure a server to accept this application as being safe, for possibly 100+ users?
Thanks