Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Batch file to install multiple msi files at once

I have an MSI file that is a wrapper for 3 other msi's with a batch file to install the 3 msi's. I extracted the 3 MSI files and wrote my own batch file to install the 3 programs seperately. They are all part of a package and need to all be installed. I can run the batch file locally on the machine and everything runs and installs fine. When I try to use PDQDeploy to run the batch file the results are odd. The first program in the file does not install but the second does. Below is the very simple batch file that I am trying to use in PDQDeploy.

msiexec /i "iSiteEnterprise.msi" ALLUSERS=1 /q /norestart
msiexec /i "iSiteExt.msi" ALLUSERS=1 /q /norestart
msiexec /i "ISScript1150.msi" ALLUSERS=1 /q /norestart

 

And here is a screenshot of my PDQDeploy Installer.

Edit If this doesn't show up I also attached the screenshot.

 

Thanks for any help.

 

-Rob




Installer.JPG
0

Comments

2 comments
Date Votes
  • Rob,

    There is probably an error code but batch files only report the code of the last command, so it's being swallowed up.  There are two things you can do.

    First, exit after the first installer if it fails and report the error to PDQ Deploy:

    msiexec /i "iSiteEnterprise.msi" ALLUSERS=1 /q /norestart
    if not "%errorlevel%"=="0" exit /b %errorlevel%
    msiexec /i "iSiteExt.msi" ALLUSERS=1 /q /norestart 
    if not "%errorlevel%"=="0" exit /b %errorlevel%
    msiexec /i "ISScript1150.msi" ALLUSERS=1 /q /norestart

    With this change you will get an error code when the first installer fails and it will also prevent the other installers from running if it fails.

    The other thing you can do is to get the MSI log, you may need to do it anyway to find out the cause for any error codes.

    msiexec /i "iSiteEnterprise.msi" ALLUSERS=1 /q /norestart /log c:\install.log

    This will generate a log file on the target computer called c:\install.log that should tell you why it's failing.  

    0
  • Anothet kind of a batch...

    @echo off
    echo Installing updates...

    for /f %%a in ('dir *.msi /b') do (
    msiexec /i "%%a" ALLUSERS=1 /q /norestart /log %SystemDrive%\install.log
    if not "%errorlevel%"=="0" exit /b %errorlevel%
    )

    As allways I recommend to put all the files in a selfextracting archive, which will run the batch after extraction.

    0