1 ; ---------------------
3 ; ---------------------
5 ; A few simple macros to handle installations on x64 machines.
7 ; RunningX64 checks if the installer is running on x64.
10 ; MessageBox MB_OK "running on x64"
13 ; DisableX64FSRedirection disables file system redirection.
14 ; EnableX64FSRedirection enables file system redirection.
17 ; ${DisableX64FSRedirection}
18 ; File some.dll # extracts to C:\Windows\System32
19 ; ${EnableX64FSRedirection}
20 ; File some.dll # extracts to C:\Windows\SysWOW64
23 !ifndef ___X64__NSH___
24 !define ___X64__NSH___
28 !macro _RunningX64 _a _b _t _f
29 !insertmacro _LOGICLIB_TEMP
30 System::Call kernel32::GetCurrentProcess()i.s
31 System::Call kernel32::IsWow64Process(is,*i.s)
33 !insertmacro _!= $_LOGICLIB_TEMP 0 `${_t}` `${_f}`
36 !define RunningX64 `"" RunningX64 ""`
38 !macro DisableX64FSRedirection
40 System::Call kernel32::Wow64EnableWow64FsRedirection(i0)
44 !define DisableX64FSRedirection "!insertmacro DisableX64FSRedirection"
46 !macro EnableX64FSRedirection
48 System::Call kernel32::Wow64EnableWow64FsRedirection(i1)
52 !define EnableX64FSRedirection "!insertmacro EnableX64FSRedirection"
54 !endif # !___X64__NSH___