Today I have expermented with Microsofts click once application installation technique.
We have an in house version information application that we use to keep track of the various version of the Global Connect product. This application stores its information in a xml datafile. As we sometime got questions like "I have module version x.y.z to which version of Global Connect does it belong ?".
My first thought was to store this xml file on our webserver and use a standard XSLT conversion to show it. I played with this for several hours but it turned out the XSL syntax was a bit hard to use for what I wanted to do with it.
Next I thought, hey lets try ClickOnce and put a version of this in house utility on the site. This utility is written in .NET 2.0 so in order to deplay it al that was needed is to check a few options in Visual Studio and publish it. Thats wat I did and yes, 10 minutes later I had a webpage with a RUN button that downloaded and exected our version utility.
In order to make it really work I had to spend another couple of hours, most difficult was to find out how to pass parameters to this application, I wanted to have it load the versions data from the webservers. Eventually I found the solution:
NameValueCollection nameValueTable = new NameValueCollection();
if (ApplicationDeployment.IsNetworkDeployed)
{
string queryString = ApplicationDeployment.CurrentDeployment.ActivationUri.Query;
nameValueTable = HttpUtility.ParseQueryString(queryString);
string v = nameValueTable.Get("load");
if (v != null)
frm.m_SourceFile = v;
else
{
string url = ApplicationDeployment.CurrentDeployment.ActivationUri.ToString();
frm.m_SourceFile = url.Substring(0, url.LastIndexOf('/') + 1) + "TravsysVersions.xml";
}
}
You can try it for your self from the Knowledgebase - Versions page