How to Increase the Notification Limit in Action Center Beyond 20?


The original post #6 didn't have an attached file, you were suppose to copy & paste the text into Notepad.

To make it easier, I've attached a copy of IncreaseNotifications.bat (in ZIP form) to post #6.
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
The original post #6 didn't have an attached file, you were suppose to copy & paste the text into Notepad.

To make it easier, I've attached a copy of IncreaseNotifications.bat (in ZIP form) to post #6.
I know, I did do that and changed the file extension to .bat.
But ohh you know what, I changed the file name which is why it likely didn't work. Thanks!

Out of curiosity though, what in the batch file is referencing the original file name?
I did actually change the file name to specifically "IncreaseNotifications.bat" like you have it, and that worked!
 

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
Computer type
Laptop
Manufacturer/Model
Asus G14 GA403UV
Unfortunately I don't think that worked, I got the same normal 20 notif max message :( I'll try running it again but idk should I try your original post?
Edit: Hold up I realized CMD was in the background saying NuGet provider was required! Now I'm getting this error message tho..

1756505155688.webp
 

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
Computer type
Laptop
Manufacturer/Model
Asus G14 GA403UV
Try it again, I found the script was saved in the wrong encoding (UTF-8 BOM). And I added an extra line because PowerShell was asking for confirmation before downloading the PSSQLite module.
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
Try it again, I found the script was saved in the wrong encoding (UTF-8 BOM). And I added an extra line because PowerShell was asking for confirmation before downloading the PSSQLite module.
Now I got this error

1756506481602.webp
 

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
Computer type
Laptop
Manufacturer/Model
Asus G14 GA403UV
Try it again, fixed the check for whether the SQLite module was installed.
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
Computer type
Laptop
Manufacturer/Model
Asus G14 GA403UV
Please run this command for me:
Code:
powershell "Import-Module PSSQLite -Verbose"
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
Computer type
Laptop
Manufacturer/Model
Asus G14 GA403UV

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
Computer type
Laptop
Manufacturer/Model
Asus G14 GA403UV
Try this version:
Code:
<# : batch script
@echo off
powershell -nop ^
"if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { ^
    Start-Process 'cmd' -ArgumentList '/c start /min %~dpnx0' -Verb RunAs ^
} ^
else { ^
    Invoke-Expression ([System.IO.File]::ReadAllText('%~f0')) ^
}"
goto :eof
#>

Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
Install-PackageProvider -Name NuGet -Force

if ((Get-Module PSSQLite -ListAvailable) -ne $null) {
    Install-Module PSSQLite -Scope CurrentUser -Force
}

$Count = 50

$DataSource = "$env:LOCALAPPDATA\Microsoft\Windows\Notifications\wpndatabase.db"
Invoke-SqliteQuery -DataSource $DataSource -Query $('UPDATE "main"."Metadata" SET "Value"=' + $Count + ' WHERE "_rowid_"=''2''')
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
Try this version:
Code:
<# : batch script
@echo off
powershell -nop ^
"if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { ^
    Start-Process 'cmd' -ArgumentList '/c start /min %~dpnx0' -Verb RunAs ^
} ^
else { ^
    Invoke-Expression ([System.IO.File]::ReadAllText('%~f0')) ^
}"
goto :eof
#>

Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
Install-PackageProvider -Name NuGet -Force

if ((Get-Module PSSQLite -ListAvailable) -ne $null) {
    Install-Module PSSQLite -Scope CurrentUser -Force
}

$Count = 50

$DataSource = "$env:LOCALAPPDATA\Microsoft\Windows\Notifications\wpndatabase.db"
Invoke-SqliteQuery -DataSource $DataSource -Query $('UPDATE "main"."Metadata" SET "Value"=' + $Count + ' WHERE "_rowid_"=''2''')
POGG TYSM that worked!!! You are the goat! I'm going to share this on Reddit now with some people who might find this useful : D

1756526898895.webp
 
Last edited:

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
Computer type
Laptop
Manufacturer/Model
Asus G14 GA403UV
Here is a final working batch/.bat file people can use, you can edit the $Count = 50 to the number of notifications you wish to hold. Thanks so much again to @garlin for creating this!!
 

Attachments

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
Computer type
Laptop
Manufacturer/Model
Asus G14 GA403UV
I've updated my version of the script, to allow you to specify the max count on the command line:
Code:
IncreaseNotifications.bat 50
IncreaseNotifications.bat 200

If you don't provide a valid number, the script resets the max back to the default 20. There's also improved checking if the PSSQLite module was already installed.
 

Attachments

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
I've updated my version of the script, to allow you to specify the max count on the command line:
Code:
IncreaseNotifications.bat 50
IncreaseNotifications.bat 200

If you don't provide a valid number, the script resets the max back to the default 20. There's also improved checking if the PSSQLite module was already installed.
Just wanted to say thanks for this script!

And for anyone having problems with it, it works well, one just gotta open it in notepad++ and change the number of the maxcount from 20 to the desired number :).
 

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
Computer type
Laptop
No, you don't have to edit the script. You provide the desired max count on the command line.

Since there always has to be a non-zero count, if you don't provide one then the script uses the same default as Windows (20). So no count on the command line is a way of resetting it back to 20.
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
No, you don't have to edit the script. You provide the desired max count on the command line.

Since there always has to be a non-zero count, if you don't provide one then the script uses the same default as Windows (20). So no count on the command line is a way of resetting it back to 20.
I edited the script to 50 and a couple days after that to 100, and it worked fine both times after I edited it. The system allowed 50 notifications and then a 100. By contrast, when I tried to run it originally without editing it didn't give me an option to write anything in the command line, just ran and finished and nothing was changed.
 

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
Computer type
Laptop

Latest Support Threads

Back
Top Bottom