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