-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfix.ps1
40 lines (30 loc) · 927 Bytes
/
fix.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$files = @(
"C:\Windows\System32\GameBarPresenceWriter.exe",
"C:\Windows\System32\GameBarPresenceWriter.proxy.dll",
"C:\Windows\System32\Windows.Gaming.UI.GameBar.dll"
)
$result
foreach ($file in $files) {
if (Test-Path $file)
{
$result = $file
takeown /f $file
ICACLS $file /grant administrators:F
timeout /T 2 /NOBREAK > $null
$newName = "$file[emadadel4].bak"
Rename-Item $file $newName
}
else
{
Clear-Host
Write-Host "The issue has already been fixed :)"
}
}
timeout /T 2 /NOBREAK > $null
if($result)
{
Write-Host "Issue fixed successfully. Enjoy smooth gaming experience!"
Write-Host "Visit my GitHub for more useful tools: https://github.com/emadadel4"
Write-Host "My Website: https://emadadel4.github.io/"
Write-Host "Telegram: https://t.me/emadadel4"
}