I'm trying to install database to LocalDB from installer class. When trying to open SQLConnection, I get an error:
Login failed for user 'NT AUTHORITY\SYSTEM'
It seems that the installer class runs from the system account, and LocalDB cannot be used by it.
Is there a way to connect LocalDB from installer?
Maybe it's possible to run installer class (or part of the code inside it) from user account (but administrative privileges are still required for the rest of installer's actions)?
The installer can be used on different machines, so I cannot know user's credentials beforehand and cannot make any changes in the system manually, only from installer class code (C#).