Hi Ben,
I think Phil has provided the useful information from MSI side. I will add
some comment from ClickOnce perspective.
ClickOnce is a deployment technology that is focused on bringing the
simplicity of Web application deployment to smart client applications. To
deploy an application with ClickOnce, you simply need to place the
application files on a Web server, file share, or the local file system and
provide the user with a link to the application manifest.
ClickOnce's advantages over MSI are: auto-update, scheduled update, .Net
secure sandbox, rollback to previous version, download/install assembly on
demond. However, MSI also has many advantage that are not available from
ClickOnce, such as: install for all users, custom action on
install/uninstall, more advanced deployment(install to registry, GAC,
services etc..). So you should compare your goal with these difference to
determine if ClickOnce will change your design. The article below provides
a overall comparison between MSI and ClickOnce, the "Key Differences" in
the article should be a clear view for you:
"Choosing Between ClickOnce and Windows Installer"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/ht
ml/clickoncevsinstaller.asp
Ok, you have chose ClickOnce and you want to lauch the ClickOnce
application from another application programmatically. Note, first, the
ClickOnce application is deployed on the Web Server, any client user will
use link to the application manifest(on web server) to lauch the
application, .Net Framework will take care of the detail lauching work. So
your lauch application may only take the application manifest URL and use
System.Diagnostics.Process class to lauch this URL. Like this:
private void button1_Click(object sender, System.EventArgs e)
{
System.Diagnostics.Process.Start("
http://msjeff2/DataGridViewMenu/DataGridVi
ewMenu.application");
}
Actually, if you use notepad to view the content of the link in the start
menu, you will see that it also takes the application manifest URL in it:
http://msjeff2/DataGridViewMenu/DataGridViewMenu.application#DataGridViewMen
u.application, Culture=neutral, PublicKeyToken=39128edeecda7dc5,
processorArchitecture=msil
.Net Framework will help to download and parse this manifest file and then
download the setup.exe package for installation. The client running
application is stored in a temp location like this:
"C:\Documents and Settings\v-jetan\Local
Settings\Apps\2.0\9XTM786M.KZ5\9Q2W43GJ.T3L\data..tion_39128edeecda7dc5_0001
.0000_a3e8721b8386f448\DataGridViewMenu.exe"
Finally, I want to tell you that ClickOnce also support programmatic
updating, your ClickOnce may leverage the ClickOnce deployment API to
updates on demand, see the sample code below:
private void checkForUpdatesMenuItem_Click(object sender,
System.EventArgs e)
{
ApplicationDeployment updater = ApplicationDeployment.CurrentDeployment;
Version verDepServer = updater.CheckForUpdate();
if (verDepServer != null) // Update available
{
DialogResult res = MessageBox.Show(
"A newer version of the TimecardManager application is available."
+ " Do you wish to update the application now?",
"TimecardManager Updater", MessageBoxButtons.YesNo);
if (res == DialogResult.Yes)
{
updater.Update();
MessageBox.Show("Please shutdown and restart the application" +
" to start using the new version.");
}
}
}
See the articles below for more information on programmatic updating:
http://windowssdk.msdn.microsoft.com/en-us/library/ms404263(VS.80).aspx
http://www.wintellect.com/Weblogs/ClickOncePartialDownloadThoughts.aspx
ClickOnce recently support a new "file patching" feature which may help to
improve updating performance, see my original reply below for more
information:
http://groups.google.com/group/microsoft.public.dotnet.framework.windowsform
s/msg/3ce329a2823f8857?hl=en-US&
Hope it helps.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.