📊 VBA (Excel)
Apply Disable Background Apps Globally (VBA)
Prevents Store apps from running in the background to save resources and battery. Applied via WScript.Shell.RegWrite from VBA.
DisableBackgroundAppsRegSet.bas
Attribute VB_Name = "DisableBackgroundAppsRegSet"
Option Explicit
Public Sub DisableBackgroundAppsRegSet()
Dim wsh As Object
Dim regPath As String
Set wsh = CreateObject("WScript.Shell")
regPath = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\GlobalUserDisabled"
wsh.RegWrite regPath, 1, "REG_DWORD"
MsgBox "Disable Background Apps Globally applied." & vbCrLf & regPath, vbInformation
End Sub