Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 11th February 2008, 20:20   #1
Otac0n
Junior Member
 
Join Date: Feb 2005
Location: Wichita, KS
Posts: 7
Send a message via AIM to Otac0n Send a message via Yahoo to Otac0n
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?
Otac0n is offline   Reply With Quote
Old 11th February 2008, 20:26   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
Where is it installed? Is it $SYSDIR? Did you turn off redirection?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 11th February 2008, 20:41   #3
Otac0n
Junior Member
 
Join Date: Feb 2005
Location: Wichita, KS
Posts: 7
Send a message via AIM to Otac0n Send a message via Yahoo to Otac0n
well, take a look:

setup.nsi
code:

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
code:

((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...
Otac0n is offline   Reply With Quote
Old 11th February 2008, 20:57   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
PROCESSOR_ARCHITECTURE will return x86 when probed in 32-bit cmd.exe. Check for the executable to run with RunningX64 instead.
code:
${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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 9th November 2008, 01:45   #5
dusal
Junior Member
 
Join Date: Nov 2008
Location: Ulaanbaatar, Mongolia
Posts: 3
Smile 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.
dusal is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump