卸载后程序数据文件在 Vista 中保持与之前相同

发布于 2024-09-15 21:33:14 字数 596 浏览 7 评论 0原文

我在 Visual Studio 2008 中使用 .NET 3.5 和 C# 开发了一个 win 窗体应用程序。该应用程序使用 Microsoft Access 2003 文件作为数据库。我的开发机器安装了Windows XP。

当我完成应用程序的开发后,我为此创建了安装项目,该项目将数据库保存在 Windows Common Application Data 文件夹中(在 XP 中:C:\Documents and Settings\All Users\Application Data,在Vista:C:\ProgramData)。

我已经在 Vista 和 XP 机器上安装了该应用程序。除了一些小错误之外,它按预期工作。然后我卸载了该程序并在 XP 和 Vista 机器上再次安装。这是一个大问题。在 XP 中它运行良好。但在 Vista 中,程序显示一个错误,指出缺少某些数据文件路径(我在数据库字段中保存了一些文件路径。)经过一些研究,我发现这个错误实际上是针对上次安装后创建的某些文件引发的。我的问题是,我已经成功卸载了程序,所以我使用的数据库也被物理删除,那么新安装的应用程序如何从以前安装的应用程序中查找数据?

这只发生在 Vista 中(不知道 Win 7 是否如此)。如果有人解决了这个问题,请告诉我。

I have developed a win form application with .NET 3.5 and C# in Visual Studio 2008. This application using Microsoft Access 2003 file as database. My development machine have Windows XP installed.

When I've completed the development of the application, I've created setup project for this, which is keeping the database in windows Common Application Data folder (in XP: C:\Documents and Settings\All Users\Application Data, and in Vista: C:\ProgramData).

I've installed the application in Vista and XP machine. Its working as desired except few small bugs. Then I've uninstalled the program and installed it again in XP and Vista machine. And here comes the BIG issue. In XP it s working nicely. But in Vista the program displaying an error which saying some data file path is missing (I am saving some file path in DB field.) After some research I found that this error actually raised for some files which was created after previous install. My question is, i have uninstalled the program successfully, so the database i used is also deleted physically, then how the newly installed application find data from previously installed application?

This is only happening in Vista (don't know about Win 7). Please let me know if anyone solved this problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

牛↙奶布丁 2024-09-22 21:33:14

如果您通过应用程序创建文件,安装程序将如何了解它们并在卸载时删除它们?创建自定义操作。

If you create files by your application, how setup will know about them and delete on uninstall? Create custom action.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文