Otac0n
11th February 2008 21:20 UTC
32-bit NSIS installer launching 64-bit child processes?
Hey guys, I'm having trouble launching DPInst from NSIS (to install my NIC drivers) on 64-bit versions of windows. It seems that no matter how I launch the executable from NSIS (Exec, ExecWait, ExecShell, or through a .cmd scripte with any of the 3), i can not get the Process to show up as a 64-bit process...
If I run it from the shell or from CMD, it works fine...
DPInst must be run as a 64-bit process to function...
any suggestions?
kichik
11th February 2008 21:26 UTC
Where is it installed? Is it $SYSDIR? Did you turn off redirection?
Otac0n
11th February 2008 21:41 UTC
well, take a look:
setup.nsi
Name "CDIF"
SetCompressor lzma
RequestExecutionLevel highest
.
.
.
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
OutFile "setup.exe"
CRCCheck on
Section "Driver"
SetOutPath "$TEMP\cdif\"
File /r "installer\"
ExecWait "$TEMP\cdif\setup.cmd"
RMDir /r "$TEMP\cdif\"
SectionEnd
setup.cmd
((echo %PROCESSOR_ARCHITECTURE% | find "IA64" /C) >> nul) && goto win64
((echo %PROCESSOR_ARCHITECTURE% | find "64" /C) >> nul) && goto winx64
:win32
cd Win32
goto install
:win64
cd Win64
goto install
:winx64
cd Winx64
goto install
:install
DPInst.exe /C /LM /Q
pause
The DPInst in each folder (for 32, AMD64, or IA64) is the correct version.
I just need to launch them as a process with the right bit-depth...
kichik
11th February 2008 21:57 UTC
PROCESSOR_ARCHITECTURE will return x86 when probed in 32-bit cmd.exe. Check for the executable to run with RunningX64 instead.
${If} ${RunningX64}
ExecWait `"$TEMP\cdif\winx64\dpinst.exe" /C /LM /Q`
${Else}
ExecWait `"$TEMP\cdif\win32\dpinst.exe" /C /LM /Q`
${EndIf}
You can also probe PROCESSOR_ARCHITEW6432 instead.
dusal
9th November 2008 02:45 UTC
Please help me
Hello. Please help me. I'm newbee.
I have i386, ia64, amd64, wow64 different dll files. How can I choose and copy files to system folder?
Can I use it like this?
SetOutPath "$SYSDIR\"
if (processor==ia64) { File "ia64\kbdmon.dll" }
elseif (processor==amd64) { File "amd64\kbdmon.dll" }
elseif (processor==wow64) { File "wow64\kbdmon.dll" }
else { File "i386\kbdmon.dll" }
If yes please help me how to I write in my *.nsi file. I don't know much about programming language.