Test Execute should be closed before continuing the installation

ぃ、小莉子 提交于 2019-12-13 02:28:19

问题


I am trying to use Test Complete/Test Execute to install third party installs on a test machine. I have written a Python script that calls a PowerShell script and installs all .msi files located within a folder using msiexec.

The command I use to call msiexec: Start-Process -FilePath msiexec.exe -ArgumentList ("/I"$fullPath"", "/qb", "ALLUSERS=TRUE", "/norestart") -Wait

All but one of my installs work. The one that is not working properly opens up and displays the following message:

I'm executing these scripts from within TestExecute so I am not able to close it, since the rest of my tests will not complete.

This installer I'm trying to use was not written by me so I'm not able to edit anything with that. Anyone know what would be causing this conflict between the .msi and TestExecute, or know of anyway that I can dig a little deeper to determine the cause?


回答1:


File Overwrite: The setup that shows this dialog is trying to replace a file that is in use, hence you get this Restart Manager dialog. This is typical behavior for certain badly authored service setups (the setup should shut down the service on its own before trying to replace files), or setups that install applications that run all the time so files can't be replaced without fuzz.


Basic UI vs No UI: You are running with the /qb option which means Basic UI - this means you get simple progress and error handling dialogs showing up. Technical details are here: User Interface Levels.

FilesInUse Dialog: An option that is not favored by me is to set the MSIRESTARTMANAGERCONTROL property to Disable as described here (all the way at the bottom). This disables the newer Restart Manager feature in Windows in favor of the old-style "FilesInUse Dialog". I am not sure if this dialog will be shown when you run your setup with /qb - it just might not show it - making your setup look completely silent (but it is not).

Proper Silent Install: I would instead enable No UI by switching to using /qn instead. The msiexec.exe command line has a few "aliases". /quiet maps to /qn for example. /passive maps rougly to /qb!. It looks like you are mixing and matching the newer "Standard installer Command-Line Options" and the "real" "msiexec.exe Command-Line Options". The former were introduced later than the latter:

  • Windows Installer 3.0 and higher: Standard Installer Command-Line Options reference for msiexec.exe
  • Windows Installer 2.0 and higher: Command-Line Options reference for msiexec.exe

It shouldn't matter what options you use, but I would be consistent in my use of one or the other. I would hence replace /norestart with REBOOT=ReallySuppress.

So you could try something like this (cmd.exe version):

msiexec.exe /I c:\MySetup.msi /qn /L*V "C:\msilog.log" ALLUSERS=1 REBOOT=ReallySuppress

Quick Parameter Explanation:

/I c:\MySetup.msi = run installation sequence for specified MSI file
/QN = run completely silently
/L*V "C:\msilog.log"= verbose logging 
ALLUSERS=1 = Install per-macine (for all users)
REBOOT=ReallySuppress = do not reboot after install even if reboot is scheduled

WICLB.exe: There used to be a tool from Wise which would help build msiexec.exe command lines via a GUI dedicated to do so. I describe it here: WICLB.exe. It disappeared as Wise went off the market, but there is a copy available from the Wayback Engine.


Similar Issue:

  • Windows Installer-Avoid FileinUse dialog box when Installing a package (long discussion of a similar issue)
  • MSIRESTARTMANAGERCONTROL
  • Installing all .msi files within a folder


来源:https://stackoverflow.com/questions/51596947/test-execute-should-be-closed-before-continuing-the-installation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!