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 / Languages / Managed C++ / May 2005

Tip: Looking for answers? Try searching our database.

Verifying 64 bit XP/2003 installation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Saran - 11 May 2005 16:22 GMT
Hi,

Can any one please tell me how to verify programmatically how to find out
the OS version (64bit XP/2003)?

Thanks much
Jochen Kalmbach [MVP] - 11 May 2005 16:26 GMT
Hi Saran!

> Can any one please tell me how to verify programmatically how to find out
> the OS version (64bit XP/2003)?

From a Win32-App?
See: GetVersionEx
http://msdn.microsoft.com/library/en-us/sysinfo/base/getversionex.asp

See:  IsWow64Process
http://msdn.microsoft.com/library/en-us/dllproc/base/iswow64process.asp

From an Win64-App:
If your app is running then you are on the correct OS!

Signature

Greetings
  Jochen

   My blog about Win32 and .NET
   http://blog.kalmbachnet.de/

Joshua - 12 May 2005 00:31 GMT
The problem you can run into with the RC version of Microsoft Windows XP
Professional x64 edition version 2003 is it will return the same major and
minor version number as Microsoft Windows Server 2003 (maj 5, min 2) rather
than the typical XP major and minor version numbers (maj 5, min 1).  

This may have been fixed with the Gold version of MS Win XP x64 but I
haven't had the opportunity to test it yet.

---
   Joshua

> Hi Saran!
>
[quoted text clipped - 10 lines]
>  From an Win64-App:
> If your app is running then you are on the correct OS!
Saran - 12 May 2005 14:30 GMT
Yes Joshua, what you mentioned is true but you can check for wProductType
after checking the version number(5.2) which is true only in 64bit XP(false
in 2003 server). I tried out both and it seems that iswon64process seems to
be a better choice.

> The problem you can run into with the RC version of Microsoft Windows XP
> Professional x64 edition version 2003 is it will return the same major and
[quoted text clipped - 21 lines]
> >  From an Win64-App:
> > If your app is running then you are on the correct OS!
Saran - 12 May 2005 14:38 GMT
Thanks much Jochen, second choice seems to be better than first one since
Minor version in Windows XP 64 bit and Windows Server 2003 is 2.

Thanks again

> Hi Saran!
>
[quoted text clipped - 10 lines]
>  From an Win64-App:
> If your app is running then you are on the correct OS!
Jochen Kalmbach [MVP] - 12 May 2005 19:50 GMT
Hi Saran!
> Thanks much Jochen, second choice seems to be better than first one since
> Minor version in Windows XP 64 bit and Windows Server 2003 is 2.

Second choice is only better if you only want to know if you are running
an x64.

Signature

Greetings
  Jochen

   My blog about Win32 and .NET
   http://blog.kalmbachnet.de/

Saran - 13 May 2005 14:40 GMT
Hi Jochen,

Can you explain me bit more? I didn't get what you meant by "if you are
running an x64"?

Here is what we want to do:

Most of our executables are 32 bit and only few are 64 bit and we would like
to programmatically launch 64 bit exe if the OS is 64 bit.

Thanks much

> Hi Saran!
> > Thanks much Jochen, second choice seems to be better than first one since
> > Minor version in Windows XP 64 bit and Windows Server 2003 is 2.
>
> Second choice is only better if you only want to know if you are running
> an x64.
Jochen Kalmbach [MVP] - 14 May 2005 07:35 GMT
Hi Saran!

> Here is what we want to do:
>
> Most of our executables are 32 bit and only few are 64 bit and we would like
> to programmatically launch 64 bit exe if the OS is 64 bit.

For this you need at least 2 exes: App(32).exe and App64.exe

The easiest chooice would be: Always start app(32).exe This app can find
out if the OS is x64 (with the IsWow64Process function). Then it can
launch the app64.exe.

Signature

Greetings
  Jochen

   My blog about Win32 and .NET
   http://blog.kalmbachnet.de/

Saran - 16 May 2005 15:41 GMT
Yes Jochen,

That's what we are also trying to do.

> Hi Saran!
>
[quoted text clipped - 8 lines]
> out if the OS is x64 (with the IsWow64Process function). Then it can
> launch the app64.exe.

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.