Archive: x64 license page problem


x64 license page problem
I am running setup on MS Windows Server 2003 Enterprise x64 Edition SP1, Dual Core AMD Opteron. Problem comes from .onInit syscall, but error situation appear later - on the license page only:


!include "MUI.nsh"
!define INAME license

Name ${INAME}
OutFile ${INAME}.exe
InstallDir "$PROGRAMFILES\${INAME}"
BGGradient 000000 000080 FFFFFF

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE license_en.txt
!insertmacro MUI_PAGE_INSTFILES

!insertmacro MUI_LANGUAGE English

Section "Dummy Section" SecDummy
SectionEnd

Function .onInit
System::Call "kernel32::Wow64DisableWow64FsRedirection(*i)"
FunctionEnd

With background gradient enabled I see image instead of license text (like on attached gif). If BG line commented unhandled exception occure, debug shows zero pointer. Temp dir created in the same place on all comps (user/local settings/temp). On 32 bits XP/2003 all is correct (just no dll entry point). Any short fix?

Seems like that System call somehow runs over some memory it shouldn't touch. Does it work if you add an actual output value?

System::Call "kernel32::Wow64DisableWow64FsRedirection(*i.r0)"
A quick fix would probably be using the macros in x64.nsh because they use Wow64EnableWow64FsRedirection.

System::Call "kernel32::Wow64DisableWow64FsRedirection(*i.r0)"
not works :( (exception without BG gradient)
The same with
!insertmacro DisableX64FSRedirection

Doesn't the gradient window show at all? Does it only show inside the license box?


Does $TEMP change before and after the redirection changes?


$TEMP not changes: e:\docume~1\admini~1\locals~1\temp\2, just created tmp folder nsm4.tmp appear under it. Temporary files present in folder (installoptions.dll, system.dll, iospecial.ini, modern-wizard.bmp).
License window repeats top level corner of (presenting) background gradient.


What happens if you use a plug-in that disables the redirection instead of using the System plug-in? I'm a bit in the dark here, because I don't have x64 Windows to test on. Maybe it's because LoadLibrary is fooled by the disabled redirection. RichEd20.dll is used right after .onInit is called.


Yes, looks like wrong dll... Moving 'disable' to .onguiinit or section solves the problem. 'disable' in .oninit and then 'enable' in the same function (after environment check) also works. Thanks :)