Home All Groups Group Topic Archive Search About

Is ClickOnce Appropriate?

Author
12 Oct 2006 4:17 PM
Ben R.
Hi,

I've got an application that I currently wrap in an msi. Everything's fine,
except I'd like to be able to push updates to my users. The update mechanism
of clickonce deployment looks excellent and would be very useful. My
application's installer doesn't touch the GAC or registry, so it seems like a
good cantidate for ClickOnce. However, this application is launched from
another application, and the path to the application is currently hardcoded
in a configuration file (it's dependent on it being installed in the same
location on every machine). I know this isn't very elegant, but it's a
limitation of the other tool. Keeping that in mind, is there a way to know
ahead of time where clickonce will install to? Otherwise, could I somehow
take advantage of the updating mechanism with my current setup?

Thanks...

-Ben

Author
12 Oct 2006 11:29 PM
Phil Wilson
If you're asking if you can update an MSI-installed app with a ClickOnce
update, the best answer is No. Once you go down the MSI path you have to
stick with it for updates (RemovePreviousVersions being the Visual Studio
upgrade mechanism). The general issue is that MSI knows what's supposed to
be installed, where it is and what the versions are. Any time you mess with
this you risk MSI's repair mechanism kicking in to restore what it thinks is
right. If you install an exe and a shortcut to it with MSI and then delete
the exe and use the shortcut you'll see MSI restore the exe. That's an
example of the auto repair.  I think there might be a Clickonce way to
deploy a newer version of your MSI to upgrade the older version, but
updating the files directly with ClickOnce isn't good.
--
Phil Wilson
[Microsoft MVP Windows Installer]
Show quote
"Ben R." <benr@newsgroup.nospam> wrote in message
news:4E4C4D93-21A2-4F5D-B79F-24DFD5E20619@microsoft.com...
> Hi,
>
> I've got an application that I currently wrap in an msi. Everything's
> fine,
> except I'd like to be able to push updates to my users. The update
> mechanism
> of clickonce deployment looks excellent and would be very useful. My
> application's installer doesn't touch the GAC or registry, so it seems
> like a
> good cantidate for ClickOnce. However, this application is launched from
> another application, and the path to the application is currently
> hardcoded
> in a configuration file (it's dependent on it being installed in the same
> location on every machine). I know this isn't very elegant, but it's a
> limitation of the other tool. Keeping that in mind, is there a way to know
> ahead of time where clickonce will install to? Otherwise, could I somehow
> take advantage of the updating mechanism with my current setup?
>
> Thanks...
>
> -Ben
Author
13 Oct 2006 3:02 AM
Jeffrey Tan[MSFT]
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.
Author
13 Oct 2006 8:19 PM
Ben R.
Thanks to both of you! This information combined provides me a great means of
making a good decision for deployment.

Do you want me to mark the accidental duplicate posts as answered as well?

-Ben

""Jeffrey Tan[MSFT]"" wrote:

Show quote
> 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.
>
>
Author
16 Oct 2006 6:05 AM
Jeffrey Tan[MSFT]
Hi Ben,

Glad to see our replies can help you.

No, I do not think it is necessary to mark the duplicate posts as resolved,
we can just focus on the technical part in this thread :-).

If you need further help, please feel free to feedback, thanks.

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.
Author
29 Nov 2006 6:19 PM
ENIZIN .enizin.net>
Hi Ben,

I have exactly the same scenario where I need to launch a legacy application
but would like to leverage the features within ClickOnce deployment. Were you
able to get your launch application working using both the MSI and ClickOnce?
If so, could you tell me how you accomplished this?

Thanks!

--
Ian


Show quote
"Ben R." wrote:

> Thanks to both of you! This information combined provides me a great means of
> making a good decision for deployment.
>
> Do you want me to mark the accidental duplicate posts as answered as well?
>
> -Ben
>
> ""Jeffrey Tan[MSFT]"" wrote:
>
> > 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.
> >
> >

AddThis Social Bookmark Button