NSIS version: 2.33
It seems nsExec has trouble finding programs that reside in C:\Windows\system32 in x64 Vista.
The attached test case works fine on 32-bit Vista (execs bcdedit.exe and prints its output), but in 64-bit Vista nsExec returns an error code.
Note that on both x86 and x64, bcdedit.exe is provided in the same dir (C:\Windows\system32) and this dir is included in the system PATH.
test case
output when running the script on vista32
Logged In: YES
user_id=766996
Originator: YES
File Added: good.png
Logged In: YES
user_id=584402
Originator: NO
This is a duplicate of RFE #1778973. Someone also submitted a possible workaround for the problem there.
http://sourceforge.net/tracker/index.php?func=detail&aid=1778973&group_id=22049&atid=373088
The problem with this issue is that nsExec can't query the installer to find out if it has disabled redirection or not. There is simply no API for it. But coming to think of it, there is no need to execute another process for x64. That second process is only for 16-bit applications and those aren't even supported on WOW64.
fixed nsExec
Logged In: YES
user_id=584402
Originator: NO
I've uploaded the aforementioned fix to Subversion. Attached is a compiled version of this fix. Please test and let me know if it works.
File Added: nsExec.zip
Logged In: YES
user_id=766996
Originator: YES
I tested attached DLL with latest release (2.35, built on Debian), and it doesn't seem to fix the problem. Also tried cherry-picking your commit from SVN (5541:5543) and building it myself, but got the same result.
really fixed nsExec
Logged In: YES
user_id=584402
Originator: NO
Quite resourceful of you to cherry pick it.
I actually recalled I have Windows XP x64 installed and tested 5543 (not just 5542 which had the IsWOW64 test backward) on it and it worked. I've attached the latest compiled version which works for me. If it still doesn't work for you, try it with executing cmd.exe. That's what I've used for my tests. Maybe bcdedit.exe or non-absolute path is somehow different.
File Added: nsExec.zip
Logged In: YES
user_id=584402
Originator: NO
Actually, I see what's the problem with your script is. You didn't disable file system redirection. Include x64.nsh and use ${DisableX64FSRedirection} before calling nsExec and ${EnableX64FSRedirection} right after.
Logged In: YES
user_id=766996
Originator: YES
Yep, that was it (although I solved it by probing $WINDIR\Sysnative). Thanks a lot!