![]() |
#1 |
Junior Member
Join Date: Jul 2019
Posts: 7
|
How to System.dll call plugin GetBinaryTypeA
Hi folks,
i have to check, if a application binary is 32 or 64 bit inside a Section. Depending on the return value i have to execute different MSI-packages. Windows has a nice function GetBinaryTypeA but i don't know how to set the parameters in NSIS syntax. Here is what i have: code: I only need the integer returned by the function. But i do always get $2 = 0, even if i use a invalid filename ![]() $0 is always empty and $1 is always a 6 digit number. Thanks in advance! Best regards, Pascal |
![]() |
![]() |
![]() |
#2 | ||
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,175
|
You are pretty close but "GetBinaryTypeA" should be "GetBinaryType" for compatibility with Unicode and ".r0" is wrong, it means write to $0, you want "r0" (read from $0).
Quote:
Quote:
Your detection is probably flawed if Office 64 installs to the real 64-bit program files folder. Use the macros in x64.nsh to disable the FS redirection around the call to GetBinaryType. IntOp $PostCount $PostCount + 1 |
||
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Jul 2019
Posts: 7
|
![]()
Works great!
Thank you very much! ![]() |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|