cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dylanchen
Level 2

Failed to remove appx in Installshield Powershell script in OS 24H2.

Hi,

I got the error when I tried to remove an appx in Installshield powershell script.

Try {
    $package = Get-AppxPackage -AllUsers -Name $packageName
    Remove-AppxPackage -AllUsers $package
}
Catch {
    Write-Host $_.Exception.Message
}
 
It throws the exception below.
 
InstallShield: Loading Assembly System.Numerics.Vectors
InstallShield: Couldn't resolve assembly by name System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
PowerShell wrapper: The type initializer for '<Module>' threw an exception.
 
It happens in the OS 24H2 (Windows 11 Pro Insider Preview).
It can work if I run the script outside of Installshield.
Any suggestions?
Labels (1)
0 Kudos
(0) Replies