Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

+ Added ability to enable or disable Xbox GameDVR #283

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea
.vs
11 changes: 11 additions & 0 deletions Individual Scripts/Disable Xbox GameDVR
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Write-Host "Disabling Xbox GameDVR"
$GameDVR1 = "HKCU:\System\GameConfigStore"
$GameDVR2 = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR"
If (!(Test-Path $GameDVR1)) {
New-Item $GameDVR1
}
Set-ItemProperty $GameDVR1 GameDVR_Enabled -Value 0
If (!(Test-Path $GameDVR2)) {
New-Item $GameDVR2
}
Set-ItemProperty $GameDVR2 AllowGameDVR -Value 0
11 changes: 11 additions & 0 deletions Individual Scripts/Enable Xbox GameDVR
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Write-Host "Re-enabling Xbox GameDVR"
$GameDVR1 = "HKCU:\System\GameConfigStore"
$GameDVR2 = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR"
If (!(Test-Path $GameDVR1)) {
New-Item $GameDVR1
}
Set-ItemProperty $GameDVR1 GameDVR_Enabled -Value 1
If (!(Test-Path $GameDVR2)) {
New-Item $GameDVR2
}
Set-ItemProperty $GameDVR2 AllowGameDVR -Value 1
16 changes: 15 additions & 1 deletion Individual Scripts/Revert Changes
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,20 @@
If (Test-Path $Advertising) {
Set-ItemProperty $Advertising Enabled -Value 1
}


#Enables Xbox GameDVR
Write-Output "Re-enabling Xbox GameDVR"
$GameDVR1 = "HKCU:\System\GameConfigStore"
$GameDVR2 = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR"
If (!(Test-Path $GameDVR1)) {
New-Item $GameDVR1
}
Set-ItemProperty $GameDVR1 GameDVR_Enabled -Value 1
If (!(Test-Path $GameDVR2)) {
New-Item $GameDVR2
}
Set-ItemProperty $GameDVR2 AllowGameDVR -Value 1

#Enables Cortana to be used as part of your Windows Search Function
Write-Output "Re-enabling Cortana to be used in your Windows Search"
$Search = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search"
Expand Down Expand Up @@ -90,3 +103,4 @@
#Enabling the Diagnostics Tracking Service
Set-Service "DiagTrack" -StartupType Automatic
Start-Service "DiagTrack"

69 changes: 56 additions & 13 deletions Windows10Debloater.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,35 @@ Function EnableCortana {
}
Set-ItemProperty $Cortana3 HarvestContacts -Value 1
}


Function DisableXboxGameDVR {
Write-Host "Disabling Xbox GameDVR"
$GameDVR1 = "HKCU:\System\GameConfigStore"
$GameDVR2 = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR"
If (!(Test-Path $GameDVR1)) {
New-Item $GameDVR1
}
Set-ItemProperty $GameDVR1 GameDVR_Enabled -Value 0
If (!(Test-Path $GameDVR2)) {
New-Item $GameDVR2
}
Set-ItemProperty $GameDVR2 AllowGameDVR -Value 0
}

Function EnableXboxGameDVR {
Write-Host "Disabling Xbox GameDVR"
$GameDVR1 = "HKCU:\System\GameConfigStore"
$GameDVR2 = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR"
If (!(Test-Path $GameDVR1)) {
New-Item $GameDVR1
}
Set-ItemProperty $GameDVR1 GameDVR_Enabled -Value 1
If (!(Test-Path $GameDVR2)) {
New-Item $GameDVR2
}
Set-ItemProperty $GameDVR2 AllowGameDVR -Value 1
}

Function Stop-EdgePDF {

#Stops edge from taking over as the default .PDF viewer
Expand Down Expand Up @@ -719,6 +747,7 @@ $Ask = 'The following will allow you to either Debloat Windows 10 or to revert c
$EverythingorSpecific = "Would you like to remove everything that was preinstalled on your Windows Machine? Select Yes to remove everything, or select No to remove apps via a blacklist."
$EdgePdf = "Do you want to stop edge from taking over as the default PDF viewer?"
$EdgePdf2 = "Do you want to revert changes that disabled Edge as the default PDF viewer?"
$XboxGameDVR = "Do you want to disable Xbox GameDVR?"
$Reboot = "For some of the changes to properly take effect it is recommended to reboot your machine. Would you like to restart?"
$OneDriveDelete = "Do you want to uninstall One Drive?"
$Unpin = "Do you want to unpin all items from the Start menu?"
Expand Down Expand Up @@ -794,6 +823,9 @@ Switch ($Prompt1) {
DisableDiagTrack
Write-Host "Diagnostics Tracking Service disabled"
Start-Sleep 1
DisableXboxGameDVR
Write-Host "Disabled Xbox GameDVR"
Start-Sleep 1
Write-Host "Disabling WAP push service"
Start-Sleep 1
DisableWAPPush
Expand All @@ -813,9 +845,20 @@ Switch ($Prompt1) {
Write-Host "You chose not to stop Edge from taking over as the default PDF viewer."
}
}
#Prompt asking to delete OneDrive
$Prompt4 = [Windows.MessageBox]::Show($OneDriveDelete, "Delete OneDrive", $Button, $ErrorIco)
#Disabling EdgePDF prompt
$Prompt4 = [Windows.MessageBox]::Show($XboxGameDVR, "Xbox GameDVR", $Button, $Warn)
Switch ($Prompt4) {
Yes {
DisableXboxGameDVR
Write-Host "Xbox GameDVR is no longer enabled"
}
No {
Write-Host "You chose not to disable Xbox GameDVR."
}
}
#Prompt asking to delete OneDrive
$Prompt5 = [Windows.MessageBox]::Show($OneDriveDelete, "Delete OneDrive", $Button, $ErrorIco)
Switch ($Prompt5) {
Yes {
UninstallOneDrive
Write-Host "OneDrive is now removed from the computer."
Expand All @@ -825,8 +868,8 @@ Switch ($Prompt1) {
}
}
#Prompt asking if you'd like to unpin all start items
$Prompt5 = [Windows.MessageBox]::Show($Unpin, "Unpin", $Button, $ErrorIco)
Switch ($Prompt5) {
$Prompt6 = [Windows.MessageBox]::Show($Unpin, "Unpin", $Button, $ErrorIco)
Switch ($Prompt6) {
Yes {
UnpinStart
Write-Host "Start Apps unpined."
Expand All @@ -837,8 +880,8 @@ Switch ($Prompt1) {
}
}
#Prompt asking if you want to install .NET
$Prompt6 = [Windows.MessageBox]::Show($InstallNET, "Install .Net", $Button, $Warn)
Switch ($Prompt6) {
$Prompt7 = [Windows.MessageBox]::Show($InstallNET, "Install .Net", $Button, $Warn)
Switch ($Prompt7) {
Yes {
Write-Host "Initializing the installation of .NET 3.5..."
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All
Expand All @@ -849,8 +892,8 @@ Switch ($Prompt1) {
}
}
#Prompt asking if you'd like to reboot your machine
$Prompt7 = [Windows.MessageBox]::Show($Reboot, "Reboot", $Button, $Warn)
Switch ($Prompt7) {
$Prompt8 = [Windows.MessageBox]::Show($Reboot, "Reboot", $Button, $Warn)
Switch ($Prompt8) {
Yes {
Write-Host "Unloading the HKCR drive..."
Remove-PSDrive HKCR
Expand All @@ -877,8 +920,8 @@ Switch ($Prompt1) {
New-PSDrive HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
Revert-Changes
#Prompt asking to revert edge changes as well
$Prompt6 = [Windows.MessageBox]::Show($EdgePdf2, "Revert Edge", $Button, $ErrorIco)
Switch ($Prompt6) {
$Prompt7 = [Windows.MessageBox]::Show($EdgePdf2, "Revert Edge", $Button, $ErrorIco)
Switch ($Prompt7) {
Yes {
Enable-EdgePDF
Write-Host "Edge will no longer be disabled from being used as the default Edge PDF viewer."
Expand All @@ -888,8 +931,8 @@ Switch ($Prompt1) {
}
}
#Prompt asking if you'd like to reboot your machine
$Prompt7 = [Windows.MessageBox]::Show($Reboot, "Reboot", $Button, $Warn)
Switch ($Prompt7) {
$Prompt8 = [Windows.MessageBox]::Show($Reboot, "Reboot", $Button, $Warn)
Switch ($Prompt8) {
Yes {
Write-Host "Unloading the HKCR drive..."
Remove-PSDrive HKCR
Expand Down
52 changes: 50 additions & 2 deletions Windows10DebloaterGUI.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ $InstallNet35 = New-Object System.Windows.Forms.Button
$InstallNet35.Text = "Install .NET v3.5"
$InstallNet35.Width = 152
$InstallNet35.Height = 39
$InstallNet35.Location = New-Object System.Drawing.Point(169, 335)
$InstallNet35.Location = New-Object System.Drawing.Point(329, 335)
$InstallNet35.Font = 'Microsoft Sans Serif,10'

$EnableDarkMode = New-Object System.Windows.Forms.Button
Expand All @@ -353,9 +353,23 @@ $DisableDarkMode.Height = 39
$DisableDarkMode.Location = New-Object System.Drawing.Point(9, 385)
$DisableDarkMode.Font = 'Microsoft Sans Serif,10'

$DisableXboxGameDVR = New-Object System.Windows.Forms.Button
$DisableXboxGameDVR.Text = "Disable Xbox GameDVR"
$DisableXboxGameDVR.Width = 152
$DisableXboxGameDVR.Height = 39
$DisableXboxGameDVR.Location = New-Object System.Drawing.Point(169, 335)
$DisableXboxGameDVR.Font = 'Microsoft Sans Serif,10'

$EnableXboxGameDVR = New-Object System.Windows.Forms.Button
$EnableXboxGameDVR.Text = "Enable Xbox GameDVR"
$EnableXboxGameDVR.Width = 152
$EnableXboxGameDVR.Height = 39
$EnableXboxGameDVR.Location = New-Object System.Drawing.Point(169, 385)
$EnableXboxGameDVR.Font = 'Microsoft Sans Serif,10'

$Form.controls.AddRange(@($Debloat, $CustomizeBlacklists, $RemoveAllBloatware, $RemoveBlacklist, $Label1, $RevertChange, $Label2, $DisableCortana, $EnableCortana, $StopEdgePDFTakeover, $EnableEdgePDFTakeover, $DisableTelemetry, $RemoveRegkeys, $UnpinStartMenuTiles, $RemoveOnedrive, $FixWhitelist, $RemoveBloatNoBlacklist, $InstallNet35, $EnableDarkMode, $DisableDarkMode))


$Form.controls.AddRange(@($Debloat, $CustomizeBlacklists, $RemoveAllBloatware, $RemoveBlacklist, $Label1, $RevertChange, $Label2, $DisableCortana, $EnableCortana, $StopEdgePDFTakeover, $EnableEdgePDFTakeover, $DisableTelemetry, $RemoveRegkeys, $UnpinStartMenuTiles, $RemoveOnedrive, $FixWhitelist, $RemoveBloatNoBlacklist, $InstallNet35, $EnableDarkMode, $DisableDarkMode, $DisableXboxGameDVR, $EnableXboxGameDVR))

$DebloatFolder = "C:\Temp\Windows10Debloater"
If (Test-Path $DebloatFolder) {
Expand Down Expand Up @@ -1307,4 +1321,38 @@ $DisableDarkMode.Add_Click( {
}
)

$DisableXboxGameDVR.Add_Click( {
Write-Host "Disabling Xbox GameDVR"
$GameDVR1 = "HKCU:\System\GameConfigStore"
$GameDVR2 = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR"
If (!(Test-Path $GameDVR1)) {
New-Item $GameDVR1
}
Set-ItemProperty $GameDVR1 GameDVR_Enabled -Value 0
If (!(Test-Path $GameDVR2)) {
New-Item $GameDVR2
}
Set-ItemProperty $GameDVR2 AllowGameDVR -Value 0
Start-Sleep 1
Write-Host "Disabled"
}
)

$EnableXboxGameDVR.Add_Click( {
Write-Host "Enabling Xbox GameDVR"
$GameDVR1 = "HKCU:\System\GameConfigStore"
$GameDVR2 = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR"
If (!(Test-Path $GameDVR1)) {
New-Item $GameDVR1
}
Set-ItemProperty $GameDVR1 GameDVR_Enabled -Value 1
If (!(Test-Path $GameDVR2)) {
New-Item $GameDVR2
}
Set-ItemProperty $GameDVR2 AllowGameDVR -Value 1
Start-Sleep 1
Write-Host "Enabled"
}
)

[void]$Form.ShowDialog()