fix shortcut path

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

View file

@ -124,7 +124,7 @@ PowerShell -Command "$archive = '%TEMP%\W10Privacy.zip';" ^
"Expand-Archive -Path $archive -DestinationPath $env:TEMP;" ^ "Expand-Archive -Path $archive -DestinationPath $env:TEMP;" ^
"$file = $env:TEMP + '\\' + (Get-ChildItem $env:TEMP\W10Privacy*.exe).BaseName + '.exe';" ^ "$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';" ^ "$shortcut = '%APPDATA%\Microsoft\Windows\Start Menu\Programs\W10Privacy.lnk';" ^
"$bytes = [System.IO.File]::ReadAllBytes($shortcut);" ^ "$bytes = [System.IO.File]::ReadAllBytes($shortcut);" ^
"$bytes[0x15] = $bytes[0x15] -bor 0x20;" ^ "$bytes[0x15] = $bytes[0x15] -bor 0x20;" ^
"[System.IO.File]::WriteAllBytes($shortcut, $bytes)" "[System.IO.File]::WriteAllBytes($shortcut, $bytes)"