Detect if X86 or X64

Ruttensoft
Ruttensoft used Ask the Experts™
on
How can I detect if my app is running on x86 or x64?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
In Task Manager on a 64-bit Windows operating system, on the Processes tab, 32 bit apps will be listed with " *32" at the end of Image Name.  You can verify by running both 32 and 64 bit versions of Internet Explorer.  The 32bit IE will show up as "iexplore *32".
I assume you want vb.net code.  Try this:

        Dim myReg As RegistryKey = Registry.LocalMachine
        Dim MyRegKey As RegistryKey
        Dim MyVal As String
        MyRegKey = myReg.OpenSubKey("HARDWARE\DESCRIPTION\SYSTEM\CentralProcessor\0")
        MyVal = MyRegKey.GetValue("Identifier")
        MyRegKey.Close()

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial