none
请问ClickOnce程序的卸载,能否调用自定义的处理 RRS feed

  • Question

  • 卸载的时候,想同时删除一些程序在某个文件夹下生成的文件,能否做到?

    (由于这些文件的量很多,不能放到ClickOnce的Data文件夹下,否则会导致升级版本的时候非常的慢)

     

    谢谢

     

    Friday, August 27, 2010 1:27 PM

Answers

All replies

  • 你好:

    请参照http://blog.csdn.net/xl_0715/archive/2010/08/12/5808006.aspx

    希望对你有所帮助。

    • Marked as answer by cs.liwei Tuesday, August 31, 2010 8:22 AM
    Monday, August 30, 2010 6:17 AM
  • 你好:

    请参照http://blog.csdn.net/xl_0715/archive/2010/08/12/5808006.aspx

    希望对你有所帮助。

    谢谢,这篇文章用程序调用控制面板的ClickOnce卸载,和我想做的事情正好相反 (T T),不过很有启发

    因为我的用户只希望从控制面板卸载程序,所以我希望能够从控制面板调用一些自己写的清除处理,

    也许能够通过修改注册表的UnstallString来实现这一点,虽然具体还不知道怎么做,不过谢谢斑竹。

     

    另外这篇文章让我发现了一个很严重的问题,原来控制面板的支持信息里面居然能直接看到http://xxxx/xxx.application的产品更新URL,

    这个URL如果暴露出来的话,岂不是任何人都可以通过这个URL安装程序,而不需要通过真正的下载页面的认证。请问这个问题是否无解?

     

     

     

    Tuesday, August 31, 2010 2:40 AM
  • 嗯,你的这个URL不会是随便什么人都可以访问的吧?

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Tuesday, August 31, 2010 4:33 AM
    Moderator
  • 嗯,你的这个URL不会是随便什么人都可以访问的吧?

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP

    担心的就是这一点,

    安装的时候进入下载页面倒是有认证,

    但ClickOnce的自动更新好像除了windows认证不支持其他认证方式,所以http://xxxx/xxx.application这个更新URL给设成了任意访问。

    如果用户无法看到这个URL倒也罢了,如果能看到,直接访问更新URL就可以安装程序,下载页面的认证就成了摆设...

    苦恼,ClickOnce不考虑这个问题么....

     



    Tuesday, August 31, 2010 7:02 AM
  • 你的下载页面可以在启动URL里面做文章嘛,传一个验证码给程序,没有验证码直接启动的时候直接退出。

     



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Tuesday, August 31, 2010 2:35 PM
    Moderator
  • 从页面下载的情况倒是不怕,

    但从开始菜单直接启动ClickOnce安装的程序,只能访问一个固定的更新URL,对这个URL做任何权限限制,都会导致无法更新。

    而ClickOnce程序的启动过程封装的太厉害,连启动参数的传递都不可能。

     

    对这个更新URL不做任何限制的话,任何人只要粘贴这个URL到浏览器里,就可以安装程序了,根本不需要通过下载页面。

     

    陷入了两难了...

     

     

    Wednesday, September 1, 2010 9:43 AM
  • 那就去掉从菜单启动的功能,要求只能网页启动?

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Wednesday, September 1, 2010 2:28 PM
    Moderator
  • 那就去掉从菜单启动的功能,要求只能网页启动?

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP

    多个用户安装使用beta版了,想用技术原因说服他们改变现在的升级方式,基本上...不可能,唉

    我曾想尝试在server端判断Request来自于ClickOnce还是浏览器,结果发现没法区别。

    另外卸载的问题也没有完全解决,如果能说服用户的话,不如干脆抛弃ClickOnce,完全自己写安装,升级,卸载程序。

    ClickOnce还是个半成品啊

    谢谢两位指点,知道哪条路是走不通的也算收获吧

    Thursday, September 2, 2010 2:44 AM
  • 那就自己写个windows身份验证处理程序吧……去搜索一下asp.net forms authentication,codeproject上有示例

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Thursday, September 2, 2010 3:00 AM
    Moderator
  • 那就自己写个windows身份验证处理程序吧……去搜索一下asp.net forms authentication,codeproject上有示例

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP

    蒋大哥说的应该是下面这个示例吧

    http://www.codeproject.com/KB/web-security/ClickOnceFormsAuth.aspx

     

    但这个也米有解决从开始菜单更新的问题

    Thursday, September 2, 2010 11:48 AM