How to include a SQL Server CE database file in appdata folder using wix installer

114 Views Asked by At

I have created a Windows application in which I have used a SQL Server CE database. Further, I have used Wix installer to create installer for this application.

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.

Any help will be highly appreciated.

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

Consider creating the file in code, either by embedding as resource or just create using SqlCeEngine.CreateDatabase