Short desc: Same .exe when ran without administrator rights can use 32bit driver. However, when ran with admin rights it's incapable to use it/find it.
My environment :
Background story: I have a WCF service hosted in consoleApplication and I'm connecting to it by WCF over net.Tcp (locally).
WCF uses for it's work VFPOLEDB.1 provider which is only 32bit. Everything works fine until I do some admin work inside application. It logicaly requires "Run As Administrator" to do it, so either Visual Studio 2013 (which hosts consoleApp) or Debug\xxx.exe must be run in "Run As Administrator" mode.
Caught exception says "VFPOLEDB.1 is not registered" (so main problem: application is 64bit and looking for 64bit drivers) ONLY when I use run as Administrator, I tried AnyCPU setting to x86 and project setting to x86 and none had effect.
Here is my question:
How can I run .exe/visual Studio 2013 in admin mode but force it to use 32bit drivers.
Thank you!
I got that problem for a MySQL DataSource, that's because your DataSource is registered only for your current user, not Machine-wide. When the application is ran as an administrator, the program is looking in the machine wide data sources
To register your DataSource System-Wide, open your Configuration Panel, in the search bar type ODBC.
Click on "configure ODBC Data Sources (32bit)"
There are two tabs that shoul interest you :
If your program is compiled in 32bit and is run as administrator it will still use the 32 bit database drivers.
If i misunderstood something please tell so that i can adapt my answer