From f2f6f0ea60c9a81a8db044ff64449a8158727dd6 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 17 Apr 2025 14:41:35 +0200 Subject: [PATCH] added admin group support for all locales --- windows-replace-nvxdapix.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 {