Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / June 2007

Tip: Looking for answers? Try searching our database.

How to detect what version of the framework you are running in?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
VistaDB - 12 Jun 2007 07:50 GMT
I cannot figure out how to detect what version of the framework my app
is running under.

If we are under 64 bit Vista there is a special registry subkey, ok
great.  But now I am getting reports from users that a Creative Labs
driver is creating the hive under Vista32 and XP 32 at install.  So if
I check for that 64 bit subkey it MAY exist because someone else
created it.

I was trying to use the Environment and other system variables in Dot
Net, but they all return Win32NT even under 64 bit Vista.  Would have
been great if that had returned Win64NT.

So, how can I from a running Dot Net 2 app detect what version of the
runtime I am in?  Not just the runtime version (I can get that) but if
my app has been promoted to 64 bit mode or not.

Thanks
Vadym Stetsyak - 12 Jun 2007 08:33 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.