.net - Windows Form Project(C#) is moving file to User's Directory -


I have a Windows project and have created a setup wizard project, so I can install it in the next next approach .

It uses Microsoft Access as the project database and I was added SetupWizard properly database file and everything was fine.

However, after the reinstallations, I note that the windows database file should be "Applications folder" C: \ users \ myUser \ AppData \ Local \ VirtualStore \ Program Files (x86) \.

And just FYI, my connection string in the app.config:

  & LT; ConnectionStrings & gt; & Lt; Add name = "ProjectName & gt; Properties. Settings database string" connectionString = "provider = Microsoft.Jet.OLEDB.4.0; data source = | data directory | \ database.mdb; security info = true; jet olendi : Database Password = Mypassword "Provider Name =" System.Data.OleDb "/> & Lt; / ConnectionStrings & gt;  

If I database would gather .exe from Projektoptput same folder. MDB does it then it works perfectly.

When I install it, it copies the database file into the C: \ user \ myUser \ AppData \ Local \ VirtualStore \ Program Files (x86) \ folder, and since then this problem is < Strong> I want the user to install it where he wants and that the file remains only there (this is a software requirement BTW).

I have also tried to establish "current user" and "all user" and the behavior is similar.

You searched for folder redirection on UAC system, this happens when you run on some OS versions Writes restricted folders:

Your code requires the Eagleement Manifest because it is for the user to ask the Administrator to raise. This may help:

And you need the Exclusive Level Admin Administrator.

If you want a limited user to be able to use your app, then redesign it so that it does not write in the things that require administration privileges, this is what the user The applications are like data.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -