i've got an oddly problem. At the end of the install I get everytime an error message that my exe file could not be written, but it is!
Here is my nsi file:
Name "foo"
OutFile "killme.exe"
InstallDir "C:\foo"
!include "MUI2.nsh"
!insertmacro MUI_PAGE_LICENSE "license.rtf"
!define MUI_PAGE_CUSTOMFUNCTION_SHOW SkipOnCond
!insertmacro MUI_PAGE_DIRECTORY
!define MUI_PAGE_CUSTOMFUNCTION_SHOW SkipOnCond
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_RUN "$INSTDIR\notepad.exe"
!insertmacro MUI_PAGE_FINISH
; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Function SkipOnCond
; some true condition...
SendMessage $HWNDPARENT ${WM_COMMAND} 1 0 ; that should emulate a click on the next button
FunctionEnd
Section ""
SetOutPath $INSTDIR
File C:\Windows\system32\notepad.exe
WriteUninstaller $INSTDIR\uninstall.exe
SectionEnd
Section "Uninstall"
Delete "$INSTDIR\*.*"
RMDir "$INSTDIR"
SectionEnd