View Single Post
Old 5th April 2020, 00:22   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,275
It is hard to say what the exact problem is.

Works fine for me

PHP Code:
!include x64.nsh
Var Platform

Section
InitPluginsDir
SetOutPath $PluginsDir
${If} ${IsNativeAMD64}
    
StrCpy $Platform "x64"
    
File "/oname=$PluginsDir\MyApp_x64.exe" "${NSISDIR}\Bin\MakeLangId.exe" Fake example app
${ElseIf} ${IsNativeIA32}    
${
OrIf} ${IsWow64}
    
StrCpy $Platform "x86"
    
File "/oname=$PluginsDir\MyApp_x86.exe" "${NSISDIR}\Bin\MakeLangId.exe" Fake example app
${Else}
    
Abort "Unsupported CPU architecture!"
${EndIf}

ExecWait '"$PluginsDir\MyApp_$Platform.exe" /foo /bar' $0
DetailPrint 
'ExitCode=$0'

SetOutPath $Temp # Release lock on $PluginsDir directory so it can be deleted
SectionEnd 
You could try Process Monitor, it will tell you if it finds the path. It might also provide some clues as to why the process fails to start if it actually finds the file.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote