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 :
- Windows 7 64bit
- Visual Studio 2013 Professional
- .Net 4.5
- Computer NOT in domain
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!