W10 shortcut as admin

This commit is contained in:
Mylloon 2023-05-17 18:09:11 +02:00
parent 7ffe3bc648
commit 367dcb7d5b
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -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"