Hello, VistaDB!
Have a look at the following links
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=284894&SiteID=1
and
http://www.thescripts.com/forum/thread655547.html
HTH
You wrote on Mon, 11 Jun 2007 23:50:21 -0700:
V> I cannot figure out how to detect what version of the framework my
V> app
V> is running under.
V> If we are under 64 bit Vista there is a special registry subkey, ok
V> great. But now I am getting reports from users that a Creative Labs
V> driver is creating the hive under Vista32 and XP 32 at install. So
V> if
V> I check for that 64 bit subkey it MAY exist because someone else
V> created it.
V> I was trying to use the Environment and other system variables in Dot
V> Net, but they all return Win32NT even under 64 bit Vista. Would have
V> been great if that had returned Win64NT.
V> So, how can I from a running Dot Net 2 app detect what version of the
V> runtime I am in? Not just the runtime version (I can get that) but
V> if
V> my app has been promoted to 64 bit mode or not.
V> Thanks
With best regards, Vadym Stetsyak.
Blog: http://vadmyst.blogspot.com
VistaDB - 12 Jun 2007 23:53 GMT
> http://www.thescripts.com/forum/thread655547.html
This is applicable, but doesn't help me. I need to know without
calling DLLImports whether I am running on 64 bit machine or not. My
app can run 32 or 64 bit, no problem. But I have a plugin with Visual
Studio that MUST write to the 32 bit key in the registry since that is
the only one it can load. I was checking for the WOW6432Node subkey,
but Creative Labs is building that key with some driver install (too
lazy to figure out how to detect this I am guessing).
So I need a way in managed code to get the information. Someone
suggested WMI http://msdn2.microsoft.com/En-US/library/aa394239.aspx
but that would not work from a partially trusted environment would it?
Thanks