diff --git a/packaging/windows/machine-install.ps1 b/packaging/windows/machine-install.ps1 index 2e2ba32..1c53508 100644 --- a/packaging/windows/machine-install.ps1 +++ b/packaging/windows/machine-install.ps1 @@ -146,7 +146,8 @@ function Set-MachineState { function Set-ShortcutAppUserModelId([string]$Path, [string]$ApplicationId) { if (-not ('GPConnect.Installer.ShortcutIdentity' -as [type])) { - Add-Type @' + # NSIS also extracts a native System.dll; reference the loaded .NET assembly explicitly. + Add-Type -ReferencedAssemblies ([System.Uri].Assembly.Location) -TypeDefinition @' using System; using System.Runtime.InteropServices;