NSIS script not installing in correct directory System32
Hello everybody,
I am trying to make an install script. I need to place some dlls and ocx on C:\Windows\System32 either on 32bits pc or 64bits pc. I am not able to redirect the system to System32 on 64 bit PC.
My script is something like this:
;--------------------------------
!include "MUI2.nsh"
!include 'LogicLib.nsh'
;!include "x64.nsh"
Section "Basic Installing DLL"
SetOutPath "$WINDIR\System32"
SetOverwrite ifnewer
DetailPrint "Installer running on 64-bit host"
;Placing dll on System32
File "C:\Installation\Basic Installation\System32\DINTER.DLL"
;Registering dll
ExecWait 'regsvr32.exe /s "$WINDIR\System32\DINTER.DLL"'
RegDLL "$WINDIR\SysWOW64\DINTER.DLL"
SectionEnd
My installation is doing the following:
- For 64 bits PCs is placing the DLLs on SysWOW64 Directory
- It is not registering correctly the DLLs
I have two questions:
- How can I redirect the installer to place my DLLs on System32 no matter if the PC/system is 32 or 64 bits?
- How can I register my DLLs correctly? Should I be using: regsvr32.exe or RegDLL?
Thank you for your help and advise,
N