MSI Install Issue - Failed to grab execution mutex

Welcome Forums General PowerShell Q&A MSI Install Issue - Failed to grab execution mutex

This topic contains 1 reply, has 2 voices, and was last updated by

 
Keymaster
2 years, 11 months ago.

  • Author
    Posts
  • #33605

    Participant
    Points: 18
    Rank: Member

    I'm having some sporadic issues when installing Flash plugin and activex. The script starts out by uninstalling all versions of flash and then installs activex and then the plugin. On some machines, I'm receiving an error "Failed to grab execution mutex. System error 258." I currently have the following code to wait for any running msi before starting any new installation. Some logs show "MSI running" several times, but sometimes they still end up receiving the mutex error. Any ideas? Here is what I have before every uninstallation and installation:

    while($true)
    {
     try
     {
       $mutex = [System.Threading.Mutex]::OpenExisting('Global\_MSIExecute')
       $mutex = $null
       Sleep 10
       'MSI running...' | Out-File $log -Force -Append
     }
     catch [System.Threading.WaitHandleCannotBeOpenedException]
     {
       # Mutex not found; MSI isn't running
       break
     }
    }
    
  • #33837

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    You might post this over at ServerFault.com. It's definitely an installer problem, not powershell per se, and it's unfortunately not one I'm familiar with.

The topic ‘MSI Install Issue - Failed to grab execution mutex’ is closed to new replies.