ClickOnce--help your users can upgrade the product after "skip" upgrade

Before the end user really have no way to solve this issue, they only can uninstall and re-install the product again, and the way developer can do is use a minimum required version to force the end user upgrade the application. This is the way we can think out, it is also the way we can find from internet.

But, today, I use the "Process Monitor" to watch which file or registry logged this flag, (base on my experience to think out there maybe such a flag to help ClickOnce work), but failed. So I try to find some clues form ClickOnce log, it has a record named "UpdateSkippedDeployment", that is our research target.

So I search it form my registry, finally I found this like registry:

=======This is the value which I have not used the skip upgrades.

[HKEY_CLASSES_ROOT\Software\Microsoft\Windows\CurrentVersion\Deployment\SideBySide\2.0\PackageMetadata\{2ec93463-b0c3-45e1-8364-327e96aea856}_{3f471841-eef2-47d6-89c0-d028f03a4ad5}\wind..tion_528ab8e88908bedb_345c11b012902441]

"{2ad613da-6fdb-4671-af9e-18ab2e4df4d8}!UpdateSkippedDeployment"=hex:00,00

===============================================================

=======This is the value after I clicked the skip button

[HKEY_CLASSES_ROOT\Software\Microsoft\Windows\CurrentVersion\Deployment\SideBySide\2.0\PackageMetadata\{2ec93463-b0c3-45e1-8364-327e96aea856}_{3f471841-eef2-47d6-89c0-d028f03a4ad5}\wind..tion_528ab8e88908bedb_345c11b012902441]

"{2ad613da-6fdb-4671-af9e-18ab2e4df4d8}!UpdateSkippedDeployment"=hex:57,00,69,\

  00,6e,00,64,00,6f,00,77,00,73,00,46,00,6f,00,72,00,6d,00,73,00,41,00,70,00,\

  70,00,6c,00,69,00,63,00,61,00,74,00,69,00,6f,00,6e,00,32,00,33,00,34,00,2e,\

  00,61,00,70,00,70,00,6c,00,69,00,63,00,61,00,74,00,69,00,6f,00,6e,00,2c,00,\

  20,00,56,00,65,00,72,00,73,00,69,00,6f,00,6e,00,3d,00,31,00,2e,00,30,00,2e,\

  00,30,00,2e,00,31,00,30,00,2c,00,20,00,43,00,75,00,6c,00,74,00,75,00,72,00,\

  65,00,3d,00,6e,00,65,00,75,00,74,00,72,00,61,00,6c,00,2c,00,20,00,50,00,75,\

  00,62,00,6c,00,69,00,63,00,4b,00,65,00,79,00,54,00,6f,00,6b,00,65,00,6e,00,\

  3d,00,35,00,32,00,38,00,61,00,62,00,38,00,65,00,38,00,38,00,39,00,30,00,38,\

  00,62,00,65,00,64,00,62,00,2c,00,20,00,70,00,72,00,6f,00,63,00,65,00,73,00,\

  73,00,6f,00,72,00,41,00,72,00,63,00,68,00,69,00,74,00,65,00,63,00,74,00,75,\

  00,72,00,65,00,3d,00,78,00,38,00,36,00,00,00

================================================================================

So, after test, I found we just can restore the value to "00 00"(delete them, then type two 0, then "OK", you can see the value), which can enable the user check the updates and upgrade the application as usual.

But base on my research there's no public API or document support this action, this post is base on my several tests and experience, so please consider carefully before you decide to use this way to let your products end users update the product.

Have a good weekend!

 

转自我的英文blog: http://mikedoszhang.blogspot.com/2012/01/clickonce-help-your-users-can-upgrade.html

你可能感兴趣的:(click)