How can I get NSIS to install and execute files from a temp directory?

前端 未结 3 540
囚心锁ツ
囚心锁ツ 2021-02-07 18:24

I\'m using the following NSIS script:

Name \"My app wrapper\"
Outfile \"MyAppSetup.exe\"
InstallDir $TEMP\\MyApp\\Install
Function .onInit
SetSilent silent
Funct         


        
3条回答
  •  抹茶落季
    2021-02-07 19:05

    Section
    InitPluginsDir
    SetOutPath "$pluginsdir\MyApp\Install" ;It is better to put stuff in $pluginsdir, $temp is shared
    
    File installer.msi
    File setup.exe
    
    ExecWait '"$pluginsdir\MyApp\Install\setup.exe"' ;You should always use full paths and proper quotes
    
    SetOutPath $exedir ;Change current dir so $temp and $pluginsdir is not locked by our open handle
    SectionEnd
    

提交回复
热议问题