I'm using MUI2 (unicode), put command nsExec::ExecToLog in install Section, but when I run Setup in Windows XP SP3 (VMWare machine), nsExec not excecute.
Why?. There may be bugs?.
nsExec::ExecToLog not working in NSIS 3.0 beta2
7 posts
What is the command/application you are executing? Does it work on other Windows versions?
Yes, I test on Windows 7 Ultimate SP1 x64, it's work fine. On WinXP SP3, it not working.
Does it fail with all applications or just some? Does "cmd /c dir" work?
This is my code:
SetOutPath '$TEMP'
File 'D:\Files\MyApp.rar' ;16MB
File 'D:\Files\Rar.exe' ;360KB
Sleep 2000
CreateDirectory '$INSTDIR'
nsExec::ExecToLog '"$TEMP\Rar.exe" x "$TEMP\MyApp.rar" -p"pass" -o+ -y "$INSTDIR"'
On WinXP SP3, it not working.
SetOutPath '$TEMP'
File 'D:\Files\MyApp.rar' ;16MB
File 'D:\Files\Rar.exe' ;360KB
Sleep 2000
CreateDirectory '$INSTDIR'
nsExec::ExecToLog '"$TEMP\Rar.exe" x "$TEMP\MyApp.rar" -p"pass" -o+ -y "$INSTDIR"'
On WinXP SP3, it not working.
Works fine for me:
Section
!include WinVer.nsh
${WinVerGetMajor} $1
${WinVerGetMinor} $2
${WinVerGetServicePackLevel} $3
DetailPrint "NSIS ${NSIS_VERSION} (${NSIS_PACKEDVERSION}) on Windows $1.$2.SP$3"
nsExec::ExecToLog '"$sysdir\cmd.exe" /C attrib "$windir\win*"'
SectionEnd NSIS v3.0b3 (0x03000060) on Windows 5.1.SP3Maybe there is something wrong with the app? Try extracting to $PluginsDir (after InitPluginsDir) and not $Temp.
A C:\windows\win.ini
A HR C:\windows\WindowsShell.Manifest
A C:\windows\WindowsUpdate.log
A C:\windows\winhlp32.exe
Completed
Thanks Anders!.
I change code to:
nsExec::ExecToLog '"$SYSDIR\cmd.exe" /C "$TEMP\Rar.exe" x "$TEMP\MyApp.rar" -p"pass" -o+ -y "$INSTDIR"'
All work fine!. 🙂
I change code to:
nsExec::ExecToLog '"$SYSDIR\cmd.exe" /C "$TEMP\Rar.exe" x "$TEMP\MyApp.rar" -p"pass" -o+ -y "$INSTDIR"'
All work fine!. 🙂