从应用程序数据卸载维克斯时删除文件 [英] Removing files from appdata when uninstalling WiX

查看:154
本文介绍了从应用程序数据卸载维克斯时删除文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在卸载我的应用程序,我想配置维克斯安装程序删除所有被添加到该文件的%APPDATA%的文件夹,的初始安装后

但现在的问题是,我的应用程序可以为许多用户运行。在应用程序启动我有一个创建的文件,如果它们不存在的功能。所以我想删除所有文件,不管是什么用户/应用程序数据他们。

有一个类似的问题已经在这里问:删除文件卸载维克斯 <当/ P>

但不同的是处理多个用户。

解决方案

剧情简介:不要那样做;给它的每个用户,但可以很容易地理解和执行。

方案:

  1. 在用户安装了一个版本的应用程序。
  2. 在零个或多个用户运行它,并且应用程序为他们创建单独的数据。
  3. 在用户卸载应用程序。

变化:

  • 而不是卸载,用户升级到较新的版本。
  • 而不是卸载,用户降级到旧版本。
  • 在用户一段时间后卸载应用程序,用户安装了一个新的版本。
  • 在用户一段时间后卸载应用程序,用户安装旧版本。
  • 在用户一段时间后卸载应用程序,用户安装的版本相同。

注意事项:

  • 用户会知道的数据,并认为这是自己的工作?
  • 用户会关心,如果数据被歼灭和重现? (这将是其他一些用户卸载使用数据的应用程序被删除了一些用户重新安装它的效果,然后。)
  • 可以在应用程序检测数据的版本?
  • 可安装程序检测数据的版本?

可能的解决方法:

让每一个用户随时决定要卸载的数据。 (该解决方案只解决了一些上面提出的问题。)

  • 在该应用程序创建一个卸载程序为运行该应用程序的每个用户。
  • 在用户数据卸载程序是由用户的配置文件下的添加/删除程序应用程序注册和/或在用户的程序菜单的快捷方式。
  • 在应用程序安装程序没有什么关系的数据。
  • 在用户数据卸载程序可以是一个简单的脚本/程序,但确实需要取消注册并删除自身,太过。做到这一点的方法之一是为Windows安装程序包默默的应用程序(每用户)安装。

When uninstalling my application, I'd like to configure the WiX setup to remove all the files that were added to %appdata% folder, after the original installation.

But here is the problem, my application can be run for many users. In the application start I have a function that creates the files if they do not exist. So I want to remove all files, no matter what "user/appdata" they are.

A similar question has already been asked here: Removing files when uninstalling WiX

But the difference is the handling for multiple users.

解决方案

Synopsis: Don't do it that way; Leave it to each user but make it easy to understand and do.

Scenario:

  1. A user installs a version of your application.
  2. Zero or more users run it, and the application creates data for them individually.
  3. A user uninstalls your application.

Variations:

  • Instead of uninstalling, a user upgrades to a newer version.
  • Instead of uninstalling, a user downgrades to an older version.
  • Some time after a user uninstalls your application, a user installs a newer version.
  • Some time after a user uninstalls your application, a user installs an older version.
  • Some time after a user uninstalls your application, a user installs the same version.

Considerations:

  • Would users be aware of the data and consider it their own work?
  • Would users care if the data was wiped out and recreated? (That would be the effect of some other user uninstalling the application with the data being deleted and then some user re-installing it.)
  • Can the application detect the version of the data?
  • Can the installer detect the version of the data?

Possible solution:

Let each user decide at any time to "uninstall" the data. (This solution addresses only some of the issues raised above.)

  • The application creates an "uninstaller" for each user that runs the application.
  • The user data uninstaller is registered by the application under the user's profile in "Add/Remove Programs" and/or as a shortcut in the user's Programs menu.
  • The application installer doesn't have anything to do with the data.
  • The user data uninstaller could be a simple script/program but does need to unregistered and delete itself, too. One way to do it is as a Windows Installer package silently installed (per-user) by the application.

这篇关于从应用程序数据卸载维克斯时删除文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆