0

I have a VB.NET application that I am connecting to SQL Server 2008. This application is a standalone .exe that runs under an account name of "mtadmin". The machine itself; however, is set up with an auto login account name of "mtguest".

Because I am not wanting to put my username and password for SQL Server in the connection string for security reasons, I want to use what I thought to be "Windows Authentication", but my question is:

Will this use the "mtguest" (logged into the machine itself) account, or will it use the "mtadmin" (application runs as this account) account? Both are local accounts to the machine in a domain environment. SQL Server has been set up with only the "mtadmin" account at this time.

Tony Hinkle
  • 4,706
  • 7
  • 23
  • 35
Source Matters
  • 1,110
  • 2
  • 15
  • 35
  • Based on what you've provided ("...runs under an acount name of 'mtadmin'"), I would expect it will use the mtadmin account. Is it not working? How is it being started--as a scheduled task? A service? – Tony Hinkle May 09 '16 at 18:38
  • Right now the application is in the "All User" startup folder, so it runs as the "mtguest" account currently. I am researching with appropriate team to see if it can be set up to always run as "mtadmin." – Source Matters May 09 '16 at 18:43

1 Answers1

0

If it's just in the Start Menu's startup folder, it will run with the account that is logged on to Windows (mtguest, in your scenario).

If you want to run it with a specific account, you can set it up as a scheduled task and set it to start when Windows starts. Alternatively, you may be able to run it as a service without any code changes by using a utility such as NSSM (see Create Windows service from executable).

Community
  • 1
  • 1
Tony Hinkle
  • 4,706
  • 7
  • 23
  • 35