Run only if Windows is 64bit.

_ColdFire_
_ColdFire_ used Ask the Experts™
on
Hi, I have VB.NET Application, but how can I make it to run just on 64bit versions of windows, not 32. ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
1st comment is not for vb.net, and second not working ...

Author

Commented:
Thanks everyone. I found solution :P
I found solution myself.

Dim sv As String
        sv = System.Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE")
        If sv = "AMD64" Then
            'do nothing
        ElseIf sv = "x64" Then
            'do nothing
        ElseIf sv = "X64" Then
            'do nothing
        Else
            MessageBox.Show("Access Denied, please contact us - admin@e3mc.net (Quote this refference number - ERR918)", "E3MC Clan")
            doexit()
        End If

Open in new window

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