[英]How to include a SQL Server CE database file in appdata folder using wix installer
I have created a Windows application in which I have used a SQL Server CE database. 我创建了一个Windows应用程序,在其中使用了SQL Server CE数据库。 Further, I have used Wix installer to create installer for this application.
此外,我已经使用Wix安装程序来为此应用程序创建安装程序。
After installing application, when I run application as administrator, everything is fine. 安装应用程序后,当我以管理员身份运行应用程序时,一切都很好。
But when I run application without administrator privileges, I get an exception: 但是,当我在没有管理员特权的情况下运行应用程序时,出现异常:
Access to the database file is not allowed
不允许访问数据库文件
I want to know the procedure to add the .sdf
file into Wix installer so that it creates a separate folder below the AppData
folder, and places the .sdf
file there. 我想知道将
.sdf
文件添加到Wix安装程序中的过程,以便它在AppData
文件夹下创建一个单独的文件夹,并将.sdf
文件放置在该位置。
Any help will be highly appreciated. 任何帮助将不胜感激。
Thanks 谢谢
考虑通过在代码中创建文件来嵌入资源,也可以只使用SqlCeEngine.CreateDatabase创建文件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.