AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do you know if an os is 64 or 32 bit?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
TheLeO



Joined: 11 Jun 2005
Posts: 264
Location: England ish

PostPosted: Tue Feb 09, 2010 7:42 am    Post subject: How do you know if an os is 64 or 32 bit? Reply with quote

Hello

Is there a build in variable or some way my script can tell if you're using a 64 bit software or 32 bit, (and works fine on multilingual windows systems)?

Reason beihing, I need it to to delete a registry entry, but it's on different places on the 64 and 32 bit systems.
I could of course attempt to delete both, but that wouldn't be very neat.

Leo..
_________________
::
I Have Spoken
::
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
doyle



Joined: 14 Nov 2007
Posts: 325
Location: London, England

PostPosted: Tue Feb 09, 2010 9:12 am    Post subject: Reply with quote

Code:
ThisProcess := DllCall("GetCurrentProcess")
; If IsWow64Process() fails or can not be found,
; assume this process is not running under wow64.
; Otherwise, use the value returned in IsWow64Process.
if !DllCall("IsWow64Process", "uint", ThisProcess, "int*", IsWow64Process)
    IsWow64Process := false
MsgBox % IsWow64Process ? "win64" : "win32"

Thanks to lexikos.
Back to top
View user's profile Send private message Visit poster's website
TheLeO



Joined: 11 Jun 2005
Posts: 264
Location: England ish

PostPosted: Tue Feb 09, 2010 7:39 pm    Post subject: Reply with quote

this works thank you.

Leo.
_________________
::
I Have Spoken
::
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group