I'm using x64.nsh and the test code below (compiled on a 32-bit XP machine). The file MyDLL64.dll is NOT installed even though it displays as being copied and no error is detected. The file MyDLL32.dll shows up in both C:\Windows\System32 and in C:\Windows\SysWOW64, but seems to be the same file because if you delete one, the other goes too (as expected). A complete search of the system shows no MyDLL64.dll file anywhere at all.
This is a simple DLL with no registration required, so simple file copy is sufficient. I don't need the complexity of InstallLib (I've tried that - it gives the same behaviour anyway).
Any suggestions as to what I'm doing wrong, or a workaround?
!include x64.nsh
outfile testwin64dll.exe
RequestExecutionLevel admin
Section Test
${If} ${RunningX64}
MessageBox MB_OK "Running on X64"
${Else}
MessageBox MB_OK "Running on (32-bit) x86"
${EndIf}
DetailPrint "${__TIMESTAMP__}"
SetOutPath $SYSDIR
; 32-bit install:
${EnableX64FSRedirection}
File MyDLL32.dll # extracts to C:\Windows\SysWOW64 -- OK
IfErrors 0 +2
DetailPrint "Failed to copy MyDLL32.dll"
; 64-bit install:
${DisableX64FSRedirection}
File MyDLL64.dll # extracts to C:\Windows\System32 -- NO IT DOESN'T!
IfErrors 0 +2
DetailPrint "Failed to copy MyDLL64.dll"
SectionEnd