如果用户卸载了程序,您将如何处理用户数据? [英] If the user uninstalls your program, what do you do with the user data?

查看:117
本文介绍了如果用户卸载了程序,您将如何处理用户数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是需要弹药的开发人员.

I'm a developer in need of ammo.

如果用户选择卸载您的程序,您将如何处理程序保存在HKEY_CURRENT_USER中的数据以及用户配置文件的其他部分?

If the user chooses to uninstall your program, what do you do with the data your program kept in HKEY_CURRENT_USER, and other parts of the user profile?

程序将用户数据(日志等)存储在用户文件夹中.客户端希望卸载以删除所有用户的所有数据.同时,普通的非管理员用户应该能够执行卸载.

The program stores user data (logs, etc) in the user folders. The client wants an uninstall to remove all those data...for all users. At the same time, the an ordinary non-admin user should be able to do the uninstall.

我找不到白皮书,文档或其他说明不应该完成的.闭幕式是雷蒙德·陈(Raymond Chen)的帖子: http://blogs.msdn.com/oldnewthing/archive/2007 /09/17/4948130.aspx

I've not been able to find a whitepaper, documentation or otherwise that says this shouldn't be done. The closes is Raymond Chen's post: http://blogs.msdn.com/oldnewthing/archive/2007/09/17/4948130.aspx

但是博客文章的弹药薄弱.

But a blog post is weak ammo.

替代方法:在安装过程中创建%SYSTEMDRIVE%\ FooProgramData.所有用户都写入此文件夹.我知道这很丑.但这是我能想到的唯一满足必须清除的所有文件上卸载"要求的方法.

Alternative : Create %SYSTEMDRIVE%\FooProgramData during install. All users write to this folder. This is ugly, I know. But this is the only way I can think of that can satisfy the "on-uninstall-all-files-must-be-cleared" requirement.

有什么想法吗?我需要更好的替代方法(如果存在的话)或坚实的白皮书,文档或徽标要求,说明卸载不应删除用户数据.

Thoughts? I need a better alternate (if one exists) or a solid whitepaper, documentation or logo requirement that says uninstalls shouldn't delete user data.

推荐答案

同时,普通的非管理员用户也应该能够执行卸载."

非管理员帐户绝对不能(也永远不能)更改其他用户的数据.

A non-admin account should never (and should never be able to) alter other users' data.

在这种情况下,您绝对可以做的绝对是删除当前用户的数据,即使如此,您也应该提示或发出警告.

The absolute most you could do in that case is delete the current user's data, and even then you should prompt or give a warning.

与Raymond一起去,它可能只是一篇博客文章,但是Raymond可以被认为不是普通的博客作者:)

Go with Raymond, it may just be a blog post, but Raymond could be considered no ordinary blogger :)

我刚刚找到 http://msdn. microsoft.com/en-us/library/bb204770.aspx#uninstall_clean ,但它并未明确说明用户数据

I've just found http://msdn.microsoft.com/en-us/library/bb204770.aspx#uninstall_clean but it doesn't say anything explicit about user data

这篇关于如果用户卸载了程序,您将如何处理用户数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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