locked
msiexec /x on multiple packages RRS feed

  • Question

  • Hello,

    I have this batch:

    Rem Version 7.1.2 msiexec /x {3793D30B-866E-4373-9CBC-6E33311729A4} /qn /log c:\uninstall.log if "%errorlevel%" GTR "0" Goto Step2 if "%errorlevel%"=="0" Goto End Step2: Rem Version 7.3.1 msiexec /x {1ACDA426-7523-4DA3-BFAA-96113EFE2507} /qn /log c:\uninstall.log if "%errorlevel%"=="0" cls &Echo Success. Rem Version 7.5.1 msiexec /x {474B6C6F-DCA6-4E3A-8BEC-811F51619E61} /qn /log c:\uninstall.log if "%errorlevel%"=="0" cls &Echo Success.

    ...

    End:

    I would like if the removal is successful Goto End if it fails because the program does not exist goto the next line... it never goes to step2 ...

    Apparently only the first msiexec runs never any others...

    What is wrong?

    Thanks,

    Dom


    System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager

    Wednesday, October 28, 2015 5:24 AM

Answers

  • This will start all at the same time:

    msiexec /x {3793D30B-866E-4373-9CBC-6E33311729A4} /qn /log %temp%\uninstall1.log
    imsiexec /x {1ACDA426-7523-4DA3-BFAA-96113EFE2507} /qn /log %temp%\uninstall2.log
    imsiexec /x {474B6C6F-DCA6-4E3A-8BEC-811F51619E61} /qn /log %temp%\uninstall3.log



    \_(ツ)_/

    • Marked as answer by Felyjos Wednesday, October 28, 2015 7:02 PM
    Wednesday, October 28, 2015 6:40 PM

All replies

  • Installer files are run under system service.  Running the file only send it to the service and the call returns immediately. You cannot wait on an installer.

    TO cascade installer packages you must create a custom batch installer using the installer SDK.  This is not an issue that can be done using batch files.  With tools like PowerShell you can monitor the installer log file for a completion status.  This can, sometimes, be useful for cascading installers.


    \_(ツ)_/

    Wednesday, October 28, 2015 7:27 AM
  • Hello,

    I don't need to wait all msiexec could run at the same time but I need them to start even all at the same time... for now only one is running...

    Thanks,

    Dom


    System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager

    Wednesday, October 28, 2015 6:20 PM
  • This will start all at the same time:

    msiexec /x {3793D30B-866E-4373-9CBC-6E33311729A4} /qn /log %temp%\uninstall1.log
    imsiexec /x {1ACDA426-7523-4DA3-BFAA-96113EFE2507} /qn /log %temp%\uninstall2.log
    imsiexec /x {474B6C6F-DCA6-4E3A-8BEC-811F51619E61} /qn /log %temp%\uninstall3.log



    \_(ツ)_/

    • Marked as answer by Felyjos Wednesday, October 28, 2015 7:02 PM
    Wednesday, October 28, 2015 6:40 PM
  • thanks a lot

    System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager

    Wednesday, October 28, 2015 7:03 PM