简体   繁体   English

在c#项目中使用sqlite数据库并创建安装程序

[英]Using sqlite database in c# project and create setup

I am trying to use Sqlite database in my C# project and I done this well in IDE. 我试图在我的C#项目中使用Sqlite数据库,我在IDE中做得很好。 My problem is when I make setup package for my project and I install it, the program can't access to the sqlite database. 我的问题是当我为我的项目制作安装包并安装它时,程序无法访问sqlite数据库。 Also I know it is because the user doesn't have permission to access file, and when I run program as administrator the problem is solved. 另外我知道这是因为用户没有访问文件的权限,当我以管理员身份运行程序时,问题就解决了。

My questions is, how can I use sqlite database in my project so that the program to be executed without administrator permission after installation? 我的问题是,如何在我的项目中使用sqlite数据库,以便在安装后无需管理员权限即可执行程序?

I am using Installshield Limited Edition to deploy my project. 我使用Installshield Limited Edition来部署我的项目。

I think that if you wrap the database in an installer, it will extract to Program Files, in which you might have problems accessing for write access with certain users. 我认为,如果您将数据库包装在安装程序中,它将提取到Program Files,在这些文件中,您可能无法访问某些用户的写访问权限。

InstallShield should have a special pseudo folder to pop the datafile in AppData. InstallShield应该有一个特殊的伪文件夹来弹出AppData中的数据文件。 You'll also need to change your program so that it expects to find the database there. 您还需要更改程序,以便在那里找到数据库。

I can't quite remember the details I'm afraid. 我不记得我害怕的细节。

Mark 标记

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM