NSIS安裝/執行MSI檔案

NSIS安裝/執行MSI檔案

NSIS安裝/執行MSI檔案


資料來源: https://nsis.sourceforge.io/Embedding_other_installers


要透過ExecWait+msiexec呼叫

; These are the programs that are needed by ACME Suite.
Section -Prerequisites
  SetOutPath $INSTDIR\Prerequisites
  MessageBox MB_YESNO "Install Microsoft ActiveSync?" /SD IDYES IDNO endActiveSync
    File "..\Prerequisites\ActiveSyncSetup.exe"
    ExecWait "$INSTDIR\Prerequisites\ActiveSyncSetup.exe"
    Goto endActiveSync
  endActiveSync:
  MessageBox MB_YESNO "Install the Microsoft .NET Compact Framework 2.0 Redistributable?" /SD IDYES IDNO endNetCF
    File "..\Prerequisites\NETCFSetupv2.msi"
    ExecWait '"msiexec" /i "$INSTDIR\Prerequisites\NETCFSetupv2.msi"'
  endNetCF:
    IfFileExists $SYSDIR\ntbackup.exe endNtBackup beginNtBackup
    Goto endNtBackup
    beginNtBackup:
    MessageBox MB_OK "Your system does not appear to have ntbackup installed.$\n$\nPress OK to install it."
    File "..\Prerequisites\ntbackup.msi"
    ExecWait '"msiexec" /i "$INSTDIR\Prerequisites\ntbackup.msi"'
  endNtBackup:
SectionEnd

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *