From 367dcb7d5b76e6c581fd37fe35f093f416cdb653 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 17 May 2023 18:09:11 +0200 Subject: [PATCH] W10 shortcut as admin --- windows11.bat | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/windows11.bat b/windows11.bat index a51e514..ff3a4f6 100644 --- a/windows11.bat +++ b/windows11.bat @@ -123,7 +123,11 @@ PowerShell -Command "$archive = '%TEMP%\W10Privacy.zip';" ^ "Invoke-WebRequest -Uri https://www.w10privacy.de/app/download/12302828636/W10Privacy.zip -OutFile $archive;" ^ "Expand-Archive -Path $archive -DestinationPath $env:TEMP;" ^ "$file = $env:TEMP + '\\' + (Get-ChildItem $env:TEMP\W10Privacy*.exe).BaseName + '.exe';" ^ - "Start-Process $file /S -NoNewWindow -Wait -PassThru" + "Start-Process $file /S -NoNewWindow -Wait -PassThru;" ^ + "$shortcut = '%ProgramData%\Microsoft\Windows\Start Menu\Programs\W10Privacy.lnk';" ^ + "$bytes = [System.IO.File]::ReadAllBytes($shortcut);" ^ + "$bytes[0x15] = $bytes[0x15] -bor 0x20;" ^ + "[System.IO.File]::WriteAllBytes($shortcut, $bytes)" :: === Modules == PowerShell -Command "Install-PackageProvider -Name NuGet -Force"