Skip to content

Commit d07a738

Browse files
authored
Revert "Remove Disable GameBarPresenceWriter"
This reverts commit a528d25.
1 parent a528d25 commit d07a738

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
@echo off
2+
CD /D "%~dp0"
3+
REM Xbox Game Bar calls amebarpresencewrite.exe automatically, this script can disable it once and for all.
4+
REM Source & Credit for NSudo: https://github.com/M2Team/NSudo
5+
set nscexe="%CD%\nsudoc.exe"
6+
if NOT exist %nscexe% echo nsudoc.exe was not found. & echo. & echo Press any key to exit . . . & pause >nul & exit
7+
goto checkadmin
8+
9+
:checkadmin
10+
echo Elevating to Administrator permissions . . .
11+
echo.
12+
NET FILE>nul 2>&1||goto elevate
13+
goto elevated
14+
15+
:elevate
16+
echo.CreateObject^("Shell.Application"^).ShellExecute%0,,,"RunAs",1 >"%CD%\runas.vbs"
17+
cscript //Nologo "%CD%\runas.vbs" >nul
18+
del /q "%CD%\runas.vbs"
19+
exit
20+
21+
:elevated
22+
NET FILE>nul 2>&1||exit
23+
echo Elevating to TrustedInstaller permissions . . .
24+
echo.
25+
whoami /groups | find /C "TrustedInstaller" >nul
26+
if %ERRORLEVEL% EQU 0 goto start
27+
%nscexe% -U:T -P:E %0
28+
exit
29+
30+
:start
31+
REM To re-enable the process, run the script again but change the 0 to 1!
32+
REM DO NOT use this (it will break too much) tenforums.com/gaming/86858-how-remove-gaming-settings.html
33+
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Gaming.GameBar.PresenceServer.Internal.PresenceWriter" /v "ActivationType" /t REG_DWORD /d 0 /f
34+
echo.
35+
echo Press any key to exit . . .
36+
pause >nul
37+
exit

GameBarPresenceWriter/nsudoc.exe

233 KB
Binary file not shown.

0 commit comments

Comments
 (0)