Error when two applications running simultaneously

image

Hello All,
When we have a fresh new device and application are been installed at the same time, just one application is installed because other one gets that error.
Is there anything that i could insert in my code to workaround this error?

Thank you

Maybe show use the lines where you are launching these MSI installs?
They are supposed to wait.

Otherwise you have multiple things triggering installations and they are fighting.

I forgot to mention that those applications are been deployed by intune

Yes, but Intune won’t install 2 things at the same time it does the installs sequentially.
I suspect you may have two msi installs attempting to be run at the same time (maybe two lines in your PSADT script without a wait for each install?)

No I just have one installation command. one application is KeePass and the other application is Google Chrome

I was checking the logs and actually both applications ran at different time, keepass ran at 10am and Chrome ran at 4pm.

Hi,
If your installation is an “EXE bootstrapper” that launches an MSI install you should add the following parameter/argument to ExecuteProcess or Start-ADTProcess (PSADT v3/v4):

-WaitForMsiExec​

Sometimes an EXE bootstrapper will launch an MSI install. In such cases, this variable will ensure that this function waits for the msiexec engine to become available before starting the install.

2 Likes

Hello,
I Was trying to use this " -WaitForMsiExec" but i got an error

Start-ADTMsiProcess -Action 'Install' -FilePath 'TeamViewer_Full.msi' -ArgumentList '/QN' -WaitForMsiExec

is it correct ?

Amazingly, -WaitForMsiExec is not a parameter for Start-ADTMsiProcess. Even I got fooled. :astonished_face: (UPDATE: :man_facepalming: I goofed, see below.)

Start-ADTMsiProcess · PSAppDeployToolkit

.

-WaitForMsiExec is, however, a parameter for Start-ADTProcess.

Start-ADTProcess · PSAppDeployToolkit

You will have to rework your line to use Start-ADTProcess instead.

UPDATE: You only need -WaitForMsiExec’ when launching a self-extracting EXE with an MSI inside. There is no need for -WaitForMsiExecforStart-ADTMsiProcess` because MSIEXEC is already working for you!

2 Likes

Unfortunately it’s not an argument for Start-ADTMsiProcess, only for Start-ADTProcess and ExecuteProcess (unclear why). Maybe the developers could add some sort of “MsiWait” functionality to the Start-ADTMsiProcess function in the future, but someone would need to request it first I guess.

Wait a minute! (I’m still waking up)

you only need ` -WaitForMsiExec’ when launching a self-extracting EXE with an MSI inside.

There is no need for -WaitForMsiExec for Start-ADTMsiProcess because it’s already working for you!

I got interested in the different options for MSI execution that exists in these functions so I did some additional tests and here is what I found.

The issue Ricardo_Alves have is that his PSADT v4 installation (using Start-ADTMsiProcess) is blocked by another MSI installation, and that installation does not complete inside the default 10 minutes that the function will wait for the mutex to become available:
image

So is it possible to extend this “wait time” if you want to or need to wait longer for msiexec to become available when using Start-ADTMsiProcess?

Yes, you only need to update the MutexWaitTime setting in the config.psd1 file like in this example:

   # The length of time in seconds to wait for the MSI installer service to become available. Default is 600 seconds (10 minutes).
   MutexWaitTime = 1800

With this setting your installation will wait for 30 minutes before failing instead of the default 10 minutes (if there is another MSI installation already in progress).

image

2 Likes