đź“„ JScript (WSH)

Disable Lock Screen Notifications (JScript)

Stops app notifications from appearing on the lock screen. Applies the tweak via WScript.Shell.RegWrite (JScript syntax).

By WindowsScripting.com · 667 B
SetDisableLockScreenNotifications.js
// ============================================================
// SetDisableLockScreenNotifications.js
//
// Disable Lock Screen Notifications.
// Stops app notifications from appearing on the lock screen.
//
// Usage: cscript SetDisableLockScreenNotifications.js
// ============================================================

var objShell = WScript.CreateObject("WScript.Shell");

try {
    objShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\PushNotifications\\LockScreenToastEnabled", 0, "REG_DWORD");
    WScript.Echo("Disable Lock Screen Notifications applied.");
} catch (e) {
    WScript.Echo("Failed to apply tweak: " + e.description);
}