How can I support separate PATH variables for 32 and 64 bit applications?

I am switching to a 64-bit Windows workstation and will be developing both 32-bit and 64-bit applications. I will need to support different PATH environment variables when running the 32-bit version of my application.

What is the best way to do this? It seems that this should be possible in the entire redistribution of the registry that is ongoing.

Thanks Dave

+4
source share
2 answers

This is not possible because system-wide environment variables are stored in HKLM \ System \ CurrentControlSet \ Control \ Session Manager \ Environment, and there is no WOW64 redirection to the SYSTEM hive.

If your program is installed in Program Files, you can add your path based on% ProgramFiles% to the PATH environment variable -% ProgramFiles% expands to 32-bit program files when working under WOW64.

+3
source

I found a "trick" based on the redirection magic that Windows does with its system32 / SysWOW64 folder. It works great for my 32-bit and 64-bit Oracle clients. I documented the procedure on my website: Use the 32-bit and 64-bit Oracle client in parallel in the 64-bit version of Windows 7, for example. .NET Applications

+1
source

Source: https://habr.com/ru/post/1285696/


All Articles