Page 2 of 2

Re: IsUserAnAdmin - IsWow64Process

Posted: Fri Dec 11, 2009 7:11 pm
by rsts
RASHAD wrote:Hi doctorized
Sorry I do't have XP 64 bit for test
So please test the next snippet it is much shorter and clear (the SYSTEM_INFO structure is about( The Processor
Architecture not the running OS )

Code: Select all

#KEY_WOW64_64KEY=$100

KeyName.s = "Software\Wow6432Node" 
KeyHandle.l = 0 
If RegOpenKeyEx_(#HKEY_LOCAL_MACHINE, @KeyName, 0,#KEY_READ|#KEY_WOW64_64KEY, @KeyHandle) = #ERROR_SUCCESS 
MessageRequester("Information","Running System is 64 bit", #MB_ICONINFORMATION)
Else
MessageRequester("Information","Running System is 32 bit", #MB_ICONINFORMATION)
EndIf
Happy new year
Yes Mr Rashad, this code returns 64 bit on my win 7 64 bit system.

Happy new year to you too, my friend :)

Re: IsUserAnAdmin - IsWow64Process

Posted: Fri Dec 11, 2009 7:37 pm
by moogle
Returns x86 for me, running Vista x64 SP2 and PB4.4 x86.

Debug GetEnvironmentVariable("PROCESSOR_ARCHITECTURE") returns "x86" instead of "AMD64" which is what it is set to in the Env Vars.

Returns the right values when I run it via PB4.4 x64