Skip to content
⌘ NSIS Forum Archive

nsExec::ExecToLog not working in NSIS 3.0 beta2

7 posts

meoit#

nsExec::ExecToLog not working in NSIS 3.0 beta2

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?.
meoit#
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.
Anders#
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.SP3
A C:\windows\win.ini
A HR C:\windows\WindowsShell.Manifest
A C:\windows\WindowsUpdate.log
A C:\windows\winhlp32.exe
Completed
Maybe there is something wrong with the app? Try extracting to $PluginsDir (after InitPluginsDir) and not $Temp.
meoit#
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!. 🙂