How to execute a msi file and wait

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Adelino Safeca
    Junior Member
    • Jul 2017
    • 11

    How to execute a msi file and wait

    Hey Anders? how do I execute a .msi file and wait till it terminates?
    I tried to use ExecWait '"msiExec.exe" /i "$INSTDIR\file.msi".
    It runs the file but does not wait. Any idea?
  • Adelino Safeca
    Junior Member
    • Jul 2017
    • 11

    #2
    How to execute a msi file and wait

    Hey?
    I´m embedding .exe files into my installer and it´s working fine using ExecWait "$INSTDIR\file.exe". I install the first and the following waits till the first terminates.

    But now I need to execute a .msi file. I am using this command
    ExecWait '"msiExec.exe" /i "$INSTDIR\file.msi". It runs the applications I want but does not wait. execute all applications in the same time.
    Any Idea? please!

    Comment

    • jpderuiter
      Major Dude
      • Feb 2007
      • 672

      #3

      Comment

      • Adelino Safeca
        Junior Member
        • Jul 2017
        • 11

        #4
        jpderuiter Thanks for answering.
        I followed the link, they say i need to use flags like start/wait installer.exe.
        Well, could I do this:
        ExecWait "$INSTDIR\ start /wait mysql-installer-community-5.7.18.1.exe"?

        Comment

        • Anders
          Moderator
          • Jun 2002
          • 5630

          #5
          Ask the author of the .MSI. NSIS will wait for msiexec, anything after that is out of our control...
          IntOp $PostCount $PostCount + 1

          Comment

          • Adelino Safeca
            Junior Member
            • Jul 2017
            • 11

            #6
            I did this:
            ExecWait '"msiExec.exe" /qb /1* mysql.txt /i "$INSTDIR\file.msi"'
            DOES NOT WORK

            Comment

            • Adelino Safeca
              Junior Member
              • Jul 2017
              • 11

              #7
              What do u mean?
              There's no way to solve it?

              Comment

              • jpderuiter
                Major Dude
                • Feb 2007
                • 672

                #8
                You should check with the the author of your msi.
                There may be a commandline switch which will force msiExec to wait for the msi to finish.

                Using "start /wait" is supposed to work also (see https://blogs.msdn.microsoft.com/hea...exe-to-finish/), but I haven't tested this myself, and could not find a working NSIS example.

                Comment

                • Kuppy
                  Junior Member
                  • Sep 2016
                  • 34

                  #9
                  PHP Code:
                  nsExec::Exec `"$SYSDIR\msiexec.exe" /a "$EXEDIR\Bin\TryMe.msi" TARGETDIR="$PLUGINSDIR\TestMSI" /qn

                  Comment

                  • Adelino Safeca
                    Junior Member
                    • Jul 2017
                    • 11

                    #10
                    Guys I am trying these different ways but getting nothing!
                    Anyway thanks!
                    If anyone get it solved, please let me know!

                    Comment

                    • Adelino Safeca
                      Junior Member
                      • Jul 2017
                      • 11

                      #11
                      But the Author of "MySQL Installer Community.msi" is ORACLE!, Not?

                      Comment

                      • jpderuiter
                        Major Dude
                        • Feb 2007
                        • 672

                        #12
                        So you're trying to install MySQL community installer?

                        See https://noelherrick.com/books/mysql-...stalling-mysql
                        Try de "/q" and "/i" commandline switches.

                        Comment

                        • Anders
                          Moderator
                          • Jun 2002
                          • 5630

                          #13
                          Originally Posted by Kuppy View Post
                          PHP Code:
                          nsExec::Exec `"$SYSDIR\msiexec.exe" /a "$EXEDIR\Bin\TryMe.msi" TARGETDIR="$PLUGINSDIR\TestMSI" /qn
                          nsExec is for console applications, a normal ExecWait is enough for MSIExec.
                          IntOp $PostCount $PostCount + 1

                          Comment

                          Working...
                          X