Archive: problems executing bat


problems executing bat
HI i'm a newbee in nsis.
how i can executa a .bat into the nsi script?

Here my script:

;--------------------------------
;Include Modern UI

!include "MUI.nsh"

;--------------------------------
;General

BGGradient 0099FF FFFFFF 000000
InstallColors /windows



;Name and file
Name "Test"
Caption "Test"
OutFile "Test.exe"


;Default installation folder
InstallDir "$PROGRAMFILES\Test"
InstallDirRegKey HKLM "Software\Test" ""


SetCompressor lzma
SetCompressorDictsize 32




!ifdef HAVE_UPX
!packhdr tmp.dat "upx -9 tmp.dat"
!endif


Section Shortcuts

CreateDirectory "$SMPROGRAMS\Test"
SetOutPath $INSTDIR
CreateShortCut "$SMPROGRAMS\Test\Test.lnk" "$INSTDIR\Test.exe"
CreateShortCut "$SMPROGRAMS\Test\uninstall.lnk" "$INSTDIR\uninstall.exe"

SectionEnd



;--------------------------------
;Interface Settings

!define MUI_ABORTWARNING

;--------------------------------
;Pages

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH


;--------------------------------
;Languages

!insertmacro MUI_LANGUAGE "Spanish"

;--------------------------------
;Installer Sections

Section ""

SetOutPath "$INSTDIR"

;ADD YOUR OWN FILES HERE...

File /r c:\Test\*.*

Exec '"$INSTDIR\" "lee.bat" ;(?) don't run

;Store installation folder
WriteRegStr HKCU "Software\Modern UI Test" "" $INSTDIR

;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"

SectionEnd


;--------------------------------
;Descriptions


;Assign language strings to sections
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_FUNCTION_DESCRIPTION_END

;--------------------------------
;Uninstaller Section

Section "Uninstall"

;ADD YOUR OWN FILES HERE...

Delete "$INSTDIR\*.*"
Delete "$INSTDIR\Uninstall.exe"
Delete "$SMPROGRAMS\*.*"
RMDir /r "$INSTDIR"
RMDir /r "$SMPROGRAMS\test"


DeleteRegKey /ifempty HKCU "Software\Modern UI Test"

SectionEnd


Exec '"$INSTDIR\bla.bat"'

But why not use NSIS script code instead of a batch file?