0

I'm trying to determine which arquitecture has the OS. I'm using this code:

!include x64.nsh

${If} ${RunningX64}
    # 64 bit code
${Else}
    # 32 bit code
${EndIf}     

But always enters to #32 bit code in spite of I'm executing it on W7 x64 OS.

dandan78
  • 13,328
  • 13
  • 64
  • 78
Docu
  • 147
  • 1
  • 15
  • Are you absolutely sure there is not something else going on? Other people have been using this without issues. Which NSIS version are you using? – Anders Aug 06 '14 at 20:01
  • 2
    possible duplicate of [How to detect windows 32bit or 64 bit using NSIS script?](http://stackoverflow.com/questions/13229212/how-to-detect-windows-32bit-or-64-bit-using-nsis-script) – Lonzak Aug 07 '14 at 07:27

1 Answers1

1

Try running this:

DetailPrint "NSIS=${NSIS_VERSION}"
System::Call 'kernel32::GetCurrentProcess()i.r0'
DetailPrint "GetCurrentProcess=$0"
System::Call 'kernel32::IsWow64Process(ir0,*i.r1)i.r2?e'
pop $3
DetailPrint "IsWow64Process: ret=$2 gle=$3 result=$1"

On my Win8 x64 OS this gives me:

NSIS=v2.46
GetCurrentProcess=-1 
IsWow64Process: ret=1 gle=80 result=1
Anders
  • 97,548
  • 12
  • 110
  • 164