AutoHotkey Community

It is currently May 27th, 2012, 2:25 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: February 9th, 2010, 8:42 am 
Offline

Joined: June 11th, 2005, 9:34 am
Posts: 264
Location: England ish
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
::


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 9th, 2010, 10:12 am 
Offline

Joined: November 14th, 2007, 2:47 pm
Posts: 335
Location: London, England
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 9th, 2010, 8:39 pm 
Offline

Joined: June 11th, 2005, 9:34 am
Posts: 264
Location: England ish
this works thank you.

Leo.

_________________
::
I Have Spoken
::


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Alpha Bravo, Bing [Bot], LazyMan, rbrtryn and 23 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group