diff --git a/windows-replace-nvxdapix.ps1 b/windows-replace-nvxdapix.ps1 index 2459fd9..890143c 100644 --- a/windows-replace-nvxdapix.ps1 +++ b/windows-replace-nvxdapix.ps1 @@ -20,8 +20,12 @@ if ($dllPath) { # Take ownership takeown /F $fullPath | Out-Null + # Find "Admin Group" to support all locales e.g. "EN: administrators", "DE: Administratoren", ... + $adminGroup = ([System.Security.Principal.SecurityIdentifier] "S-1-5-32-544").Translate([System.Security.Principal.NTAccount]).Value + $adminGroupName = $adminGroup.Split('')[1] + # Grant full control to administrators - icacls $fullPath /grant Administratoren:F | Out-Null + icacls $fullPath /grant "$adminGroupName:F" | Out-Null # Attempt to stop processes using the DLL (optional: may not apply to DriverStore) Get-Process | Where-Object {