Newer
Older
CVSS_3.0_GUI / node_modules / nwjs-builder-phoenix / assets / nsis / Include / x64.nsh
root on 7 May 2019 1 KB Initial commit
  1. ; ---------------------
  2. ; x64.nsh
  3. ; ---------------------
  4. ;
  5. ; A few simple macros to handle installations on x64 machines.
  6. ;
  7. ; RunningX64 checks if the installer is running on a 64-bit OS.
  8. ; IsWow64 checks if the installer is a 32-bit application running on a 64-bit OS.
  9. ;
  10. ; ${If} ${RunningX64}
  11. ; MessageBox MB_OK "running on x64"
  12. ; ${EndIf}
  13. ;
  14. ; DisableX64FSRedirection disables file system redirection.
  15. ; EnableX64FSRedirection enables file system redirection.
  16. ;
  17. ; SetOutPath $SYSDIR
  18. ; ${DisableX64FSRedirection}
  19. ; File some.dll # extracts to C:\Windows\System32
  20. ; ${EnableX64FSRedirection}
  21. ; File some.dll # extracts to C:\Windows\SysWOW64
  22. ;
  23.  
  24. !ifndef ___X64__NSH___
  25. !define ___X64__NSH___
  26.  
  27. !include LogicLib.nsh
  28.  
  29.  
  30. !define IsWow64 `"" IsWow64 ""`
  31. !macro _IsWow64 _a _b _t _f
  32. !insertmacro _LOGICLIB_TEMP
  33. System::Call kernel32::GetCurrentProcess()p.s
  34. System::Call kernel32::IsWow64Process(ps,*i0s)
  35. Pop $_LOGICLIB_TEMP
  36. !insertmacro _!= $_LOGICLIB_TEMP 0 `${_t}` `${_f}`
  37. !macroend
  38.  
  39.  
  40. !define RunningX64 `"" RunningX64 ""`
  41. !macro _RunningX64 _a _b _t _f
  42. !if ${NSIS_PTR_SIZE} > 4
  43. !insertmacro LogicLib_JumpToBranch `${_t}` `${_f}`
  44. !else
  45. !insertmacro _IsWow64 `${_a}` `${_b}` `${_t}` `${_f}`
  46. !endif
  47. !macroend
  48.  
  49.  
  50. !define DisableX64FSRedirection "!insertmacro DisableX64FSRedirection"
  51. !macro DisableX64FSRedirection
  52. System::Call kernel32::Wow64EnableWow64FsRedirection(i0)
  53. !macroend
  54.  
  55. !define EnableX64FSRedirection "!insertmacro EnableX64FSRedirection"
  56. !macro EnableX64FSRedirection
  57. System::Call kernel32::Wow64EnableWow64FsRedirection(i1)
  58. !macroend
  59.  
  60.  
  61. !endif # !___X64__NSH___
Buy Me A Coffee