简体   繁体   中英

Embedding SqlLocalDb in NSIS installer script

I'm trying to embed sqllocaldb into my installer script.

the installer so far is working. The application gets installed. But the user should be asked if he wants to install sqllocaldb. If I say yes the installer just throws the sqllocaldb.msi to the installed dir and does not execute it.

I followed the script on the nsis page but..

Section "SqlLocaldb"
 SetOutPath $INSTDIR\Prerequisites
 MessageBox MB_YESNO "Would you like to use a local db Server?" /SD IDYES IDNO endSqlLocaldb
    IfFileExists 'C:\Program Files\Microsoft SQL Server\110\Tools\Binn\SqlLocalDB.exe' endSqlLocaldb beginSqlLocaldb
    Goto endSqlLocaldb
    beginSqlLocaldb:
    File "SqlLocaLDB.msi"
    ExecWait '"SqlLocaLDB.msi" /i "$INSTDIR\Prerequisites\SqlLocaLDB.msi"'
    endSqlLocaldb:
SectionEnd

Any ideas what i'm missing out here?

这很老,但是:execwait应该是

ExecWait  'msiexec /i "$INSTDIR\Prerequisites\SqlLocaLDB.msi"'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM