Skip to content

Instantly share code, notes, and snippets.

@JPersson77
Last active May 15, 2025 16:24
Show Gist options
  • Save JPersson77/91a5c53af55104a2bfc5c9be32118203 to your computer and use it in GitHub Desktop.
Save JPersson77/91a5c53af55104a2bfc5c9be32118203 to your computer and use it in GitHub Desktop.
nVAppAppApp - workaround NVIDIA DLSS4 whitelisting
<# Workaround for NVIDIA's DLSS4 whitelisting
DLSS4 was launched alongside the RTX 5000 series and comprise several new and interesting
features, f.e. additional presets for Super Resolution, using a newer Transformer model.
Arguably these features increase image quality significantly. To various degrees these
features are also available for older RTX cards, and older games using DLSS3/2.
Using third party apps like DLSS Swapper etc remains a convenient way to, on a manual basis,
swap out DLLs which contain the above mentioned functionality, per game. Downsides to this is
primarily that swapping out DLLs for online multi-player games may trigger an Anti-Cheat
system, and there is of course also some manual work of updating to newer versions/DLLs.
With the launch of DLSS4 nVidia has taken steps to integrate some functionality in their
NVIDIA App to also let the user "swap" DLSS versions manually. This is in theory nice as it
allows for games to automatically be updated to the latest and greatest by driver updates.
Plus, it means that DLLs aren't actually "swapped" since it is done by a dynamic loading
mechanism, which shouldmean that DLSS versions CAN be switched for (many) online multi-
player games.
BUT their implementation is too restrictive.
You may have noticed how DLSS4 needs to be enabled on a per game basis in NVIDIA app, and
also how the feature can not be enabled for all games using DLSS3/2. This is because
nVidia decided to implement the features using a whitelisting mechanism. I.e. the feature
can only be enabled on games deemed "supported" by nVidia. There are actually good reasons for
nVidia to implement a whitelisting system, for example to ensure that DLSS4 provides a good
image quality in "supported" games, and to avoid potentially triggering Anti-Cheat systems
for online multi-player games.
Using nVidia Profile Inspector, and similar tools, it is nevertheless possible to set the
global profile, or per game, to use the updated DLLs and thus force DLSS4 features on all/
select games. However NVIDIA App is actually rather controlling about this and will reverse
these changes for "unsupported" games when the app is launched or when an unsupported game
is launched.
A workaround currently is to not install NVIDIA App, and instead use nVidia Profile Inspector.
But I personally find the overlay and RTX HDR worth keeping NVIDIA App installed for. It may
eventually also become mandatory to have installed.
Going through some hoops it is fortunately possible to override the whitelisting and keep
NVIDIA App installed. The script below is a powershell (v5.1+) script which the user should
run once, and then potentially before driver (re-)install to allow the driver installer to
update a write-protected file (fingerprint.db).
So what does the script do:
A) Present the user with a menu with three options:
1. Driver upgrade - run this before updating nVidia driver and follow instructions
2. Run script - same functionality as previously (patch files)
3. Quit - Exit the menu and quit the script
Both options 1 and 2 will do the following:
1) Remove "ReadOnly" property on two files.
- ApplicationStorage.json which contains the settings for detected games on the system
- fingerprint.db which is the origin file for all override settings
2) Modify the files to remove the override restrictions put in place by NVIDIA App.
3) Set the origin file (fingerprint.db) to "Read Only"
4) Restart two nVidia services <- this require admin rights for the script. Otherwise you
need to restart the computer for it to take effect.
PLEASE NOTE THE FOLLOWING!
1) This script should run as administrator to be able to restart two nVidia services
2) This script will/may allow for updating your online multi-player game's DLSS versions
which may or may not trigger Anti-Cheat systems. I tried it with Space Marines 2
successfully (totally worth it) but YMMV.
3) The screen will blink/black out twice when the services restart
USE AT YOUR OWN DISCRETION! Be careful with online multi player games with Anti-Cheat systems!
ADDITIONAL NOTE ON HOW TO RUN POWERSHELL SCRIPTS (added 2025-02-25)
By default an unsigned script (like nVAppAppApp.ps1) downloaded to your local machine can
not be executed - for security reasons. It is possible to workaround by starting powershell
with a temporary bypass or by setting a permanent override. To do a temporary workaround
you would press WIN+R to get the Run-dialog and execute:
`powershell -executionpolicy bypass`
To set a permanent override you type "powershell" on the start-menu, right click and select
"Run as administrator" and once you are at the PowerShell command prompt execute:
`Set-ExecutionPolicy unrestricted`
In either case you now have a PowerShell prompt open that can/will run the script.
Version 2
- UTF-8 w/o BOM
Version 3
- Modify the override origin file (fingerprint.db)
- Changed modus operandi - run the script after reinstalling driver
Version 4 (2025-02-25)
- No change to the actual script. It works good and the effects seem to persist even
through driver installs.
- Added notes on how to allow PowerShell to run local scripts
Version 5 (2025-03-10)
- Added a user friendly menu with three options.
1. Driver upgrade. Run the script before installing a new driver and follow the isntructions.
2. Run the script (same functionality as before)
3. Quit
#>
#Requires -Version 5.1
$AppStorageJsonPath = "$Env:USERPROFILE\AppData\Local\NVIDIA Corporation\NVIDIA app\NvBackend\ApplicationStorage.json"
$FingerprintPath = "$Env:USERPROFILE\AppData\Local\NVIDIA Corporation\NVIDIA app\NvBackend\ApplicationOntology\data\fingerprint.db"
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
#region Initial Checks
function Check-AdminRights {
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
return $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
}
$isAdmin = Check-AdminRights
if (-not $isAdmin) {
Write-Host "`nWARNING: Not running with administrator privileges" -ForegroundColor DarkRed
Write-Host "Service restarts will fail. To ensure full functionality:" -ForegroundColor Gray
Write-Host "Right-click PowerShell and select 'Run as administrator'`n" -ForegroundColor Gray
Start-Sleep -Seconds 5
}
#endregion
function Show-Header {
Clear-Host
Write-Host "`n"
Write-Host "========================================================" -ForegroundColor Green
Write-Host " NVIDIA DLSS4 Whitelist Workaround Script " -ForegroundColor Black -BackgroundColor Green
Write-Host "========================================================" -ForegroundColor Green
Write-Host "`n"
}
function Run-Script {
# Remove Read-Only from both files
Set-ItemProperty -Path $AppStorageJsonPath -Name IsReadOnly -Value $false
Set-ItemProperty -Path $FingerprintPath -Name IsReadOnly -Value $false
# Modify ApplicationStorage.json
Write-Host "`n Modifying ApplicationStorage.json..." -ForegroundColor White
$contents = (Get-Content $AppStorageJsonPath )
$contents = $contents.Replace('"Disable_FG_Override":true', '"Disable_FG_Override":false')
$contents = $contents.Replace('"Disable_RR_Override":true', '"Disable_RR_Override":false')
$contents = $contents.Replace('"Disable_SR_Override":true', '"Disable_SR_Override":false')
$contents = $contents.Replace('"Disable_RR_Model_Override":true', '"Disable_RR_Model_Override":false')
$contents = $contents.Replace('"Disable_SR_Model_Override":true', '"Disable_SR_Model_Override":false')
[System.IO.File]::WriteAllLines($AppStorageJsonPath, $contents, $Utf8NoBomEncoding)
# Modify fingerprint.db
Write-Host "`n Modifying fingerprint.db..." -ForegroundColor White
$contents = (Get-Content $FingerprintPath )
$contents = $contents.Replace('<Disable_FG_Override>1</Disable_FG_Override>', '<Disable_FG_Override>0</Disable_FG_Override>')
$contents = $contents.Replace('<Disable_RR_Model_Override>1</Disable_RR_Model_Override>', '<Disable_RR_Model_Override>0</Disable_RR_Model_Override>')
$contents = $contents.Replace('<Disable_RR_Override>1</Disable_RR_Override>', '<Disable_RR_Override>0</Disable_RR_Override>')
$contents = $contents.Replace('<Disable_SR_Model_Override>1</Disable_SR_Model_Override>', '<Disable_SR_Model_Override>0</Disable_SR_Model_Override>')
$contents = $contents.Replace('<Disable_SR_Override>1</Disable_SR_Override>', '<Disable_SR_Override>0</Disable_SR_Override>')
[System.IO.File]::WriteAllLines($FingerprintPath, $contents, $Utf8NoBomEncoding)
# Set fingerprint.db to Read-Only
Set-ItemProperty -Path $FingerprintPath -Name IsReadOnly -Value $true
# Restart services (requires admin rights)
if ($isAdmin)
{
try {
Write-Host "`n Restarting NVIDIA services..." -ForegroundColor White
Restart-Service -Force -Name "NVDisplay.ContainerLocalSystem" -ErrorAction Stop
Restart-Service -Force -Name "NvContainerLocalSystem" -ErrorAction Stop
Write-Host "`n Services restarted successfully" -ForegroundColor Green
}
catch {
Write-Host "`n ERROR: Failed to restart services" -ForegroundColor DarkRed
Write-Host " Details: $_" -ForegroundColor DarkRed
}
}
else {
Write-Host "`n WARNING: Services not restarted" -ForegroundColor DarkRed
Write-Host " Run as administrator for complete functionality" -ForegroundColor DarkRed
}
Write-Host "`n Operation completed!`n" -ForegroundColor Black -BackgroundColor Green
}
# Display menu
do {
Show-Header
Write-Host " MAIN MENU" -ForegroundColor Green
Write-Host "--------------------------------------------------------" -ForegroundColor Green
Write-Host " 1. Start driver upgrade mode" -ForegroundColor White
Write-Host " - Prepares for driver update" -ForegroundColor DarkGray
Write-Host " - Patches files after confirmation" -ForegroundColor DarkGray
Write-Host "`n 2. Run script immediately" -ForegroundColor White
Write-Host " - Patch files directly" -ForegroundColor DarkGray
Write-Host "`n 3. Exit" -ForegroundColor White
Write-Host " - Quits the tool" -ForegroundColor DarkGray
Write-Host "--------------------------------------------------------" -ForegroundColor Green
$choice = Read-Host "`n Please enter your choice (1-3)"
switch ($choice) {
'1' {
Show-Header
Write-Host " DRIVER UPGRADE MODE" -ForegroundColor Green
Write-Host "--------------------------------------------------------" -ForegroundColor Green
Set-ItemProperty -Path $FingerprintPath -Name IsReadOnly -Value $false -ErrorAction SilentlyContinue
Write-Host "`n Read-only attribute removed from fingerprint.db" -ForegroundColor White
Write-Host "`n Perform your driver upgrade now!" -ForegroundColor White
Write-Host "`n Press any key AFTER the driver is installed..." -ForegroundColor White
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
Run-Script
pause
}
'2' {
Show-Header
Write-Host " PATCHING FILES" -ForegroundColor Green
Write-Host "--------------------------------------------------------" -ForegroundColor Green
Run-Script
pause
}
'3' {
Show-Header
Write-Host " Exiting... Thank you for using the tool!" -ForegroundColor Gray
Start-Sleep -Seconds 2
exit
}
default {
Write-Host "`n Invalid selection. Please choose 1, 2, or 3." -ForegroundColor DarkRed
Start-Sleep -Seconds 2
}
}
} while ($true)
@Madbrad200
Copy link

Thanks for the update!

@lionelelu
Copy link

Thanks for your hard work! I got everything running and was able to modify my SkyrimVR settings to enable the latest DLSS. However, I’m now running into an issue.

I updated my drivers before you released the latest update to the tool, so I didn’t have the option to upgrade fingerprint.db at that time. Now, the Nvidia App no longer allows me to change the DLSS Override - Super Resolution and DLSS Override - Model Presets settings. Instead, it displays a "Support not detected" message.

Do you have any advice on how to resolve this? And obviously I reinstalled the script after the driver update.

Thanks in advance!

@Mordorah
Copy link

Mordorah commented Mar 14, 2025

Thanks for your hard work! I got everything running and was able to modify my SkyrimVR settings to enable the latest DLSS. However, I’m now running into an issue.

I updated my drivers before you released the latest update to the tool, so I didn’t have the option to upgrade fingerprint.db at that time. Now, the Nvidia App no longer allows me to change the DLSS Override - Super Resolution and DLSS Override - Model Presets settings. Instead, it displays a "Support not detected" message.

Do you have any advice on how to resolve this? And obviously I reinstalled the script after the driver update.

Thanks in advance!

Nvapp is riddled with bugs. Recent NVapp update did this to me and completely borked Smooth Motion in a way where enabling + disabling it was no longer possible.

I would suggest DDU your drivers. Which will get rid of Nvapp too. Go ahead and install it fresh. Ideally with Nvcleaninstall.

During Nvcleaninstall installation DO NOT install Nvapp. (It installs an older version then updates it which we are trying to avoid)

Instead, go to Nvapp page on Nvidia's website and download and install it separately. I should download the latest version.

After doing all this run this script.

Give it a go. It fixed my issues.

However it's clear that we are a long way away from a proper working Nvapp.

@dedors
Copy link

dedors commented Mar 14, 2025

Regarding section "ADDITIONAL NOTE ON HOW TO RUN POWERSHELL SCRIPTS (added 2025-02-25)"

I just clicked "edit" the file and saved it under a different name. That was enough to run it.

@lionelelu
Copy link

Thanks for your hard work! I got everything running and was able to modify my SkyrimVR settings to enable the latest DLSS. However, I’m now running into an issue.
I updated my drivers before you released the latest update to the tool, so I didn’t have the option to upgrade fingerprint.db at that time. Now, the Nvidia App no longer allows me to change the DLSS Override - Super Resolution and DLSS Override - Model Presets settings. Instead, it displays a "Support not detected" message.
Do you have any advice on how to resolve this? And obviously I reinstalled the script after the driver update.
Thanks in advance!

Nvapp is riddled with bugs. Recent NVapp update did this to me and completely borked Smooth Motion in a way where enabling + disabling it was no longer possible.

I would suggest DDU your drivers. Which will get rid of Nvapp too. Go ahead and install it fresh. Ideally with Nvcleaninstall.

During Nvcleaninstall installation DO NOT install Nvapp. (It installs an older version then updates it which we are trying to avoid)

Instead, go to Nvapp page on Nvidia's website and download and install it separately. I should download the latest version.

After doing all this run this script.

Give it a go. It fixed my issues.

However it's clear that we are a long way away from a proper working Nvapp.

Do you have the links of NvCleanInstall? I wanna try this

@Mordorah
Copy link

Thanks for your hard work! I got everything running and was able to modify my SkyrimVR settings to enable the latest DLSS. However, I’m now running into an issue.
I updated my drivers before you released the latest update to the tool, so I didn’t have the option to upgrade fingerprint.db at that time. Now, the Nvidia App no longer allows me to change the DLSS Override - Super Resolution and DLSS Override - Model Presets settings. Instead, it displays a "Support not detected" message.
Do you have any advice on how to resolve this? And obviously I reinstalled the script after the driver update.
Thanks in advance!

Nvapp is riddled with bugs. Recent NVapp update did this to me and completely borked Smooth Motion in a way where enabling + disabling it was no longer possible.
I would suggest DDU your drivers. Which will get rid of Nvapp too. Go ahead and install it fresh. Ideally with Nvcleaninstall.
During Nvcleaninstall installation DO NOT install Nvapp. (It installs an older version then updates it which we are trying to avoid)
Instead, go to Nvapp page on Nvidia's website and download and install it separately. I should download the latest version.
After doing all this run this script.
Give it a go. It fixed my issues.
However it's clear that we are a long way away from a proper working Nvapp.

Do you have the links of NvCleanInstall? I wanna try this

NvCleanInstall > https://www.techpowerup.com/download/techpowerup-nvcleanstall/

DDU > https://www.wagnardsoft.com/forums/viewtopic.php?t=5210

NvApp Standalone > https://www.nvidia.com/en-us/software/nvidia-app/

@AlexandreBourrieau
Copy link

AlexandreBourrieau commented Mar 24, 2025

Hello, nvidiaApp do not launch correctly after aplying this script ... I got always an error saying I must restart and reinstall ...

@JPersson77
Copy link
Author

Hi @AlexandreBourrieau assuming you are using the "Driver upgrade mode" of the most recent script. NvApp crashed for me in relation to installing 572.83 as well. NvApp automatically launched after installation finished, but with a blocking error message (a dialog). Since NvApp launched immediately after driver install I did not have the the time to reapply the patch before NvApp launched.

It is unclear why the error message appeared at this point as the relevant files were at this time write-enabled (and they were indeed overwritten by the installer). My next step was to manually install NVIDIA_app_beta_v11.0.3.213, while still not having let the script patch files. I then received a similar error message while installing NvApp manually. However closing the error message etc and launching NvApp manually worked fine after this with no adverse effects noted. At this point I applied the patch again. It was now too late though for the patch and so I had to redo all my custom settings in NVPI (which is mostly just restoring the profiles NvApp creates to default)

So yeah I have a similar experience. I agree it seems plausible the script may have something to do with it, but then I don't know how/why since the idea of the "driver upgrade mode" is to remove the write-protection and ensure that the nvidia/nvapp installer can overwrite the files (which it did)

@AlexandreBourrieau
Copy link

AlexandreBourrieau commented Mar 24, 2025

Hi @AlexandreBourrieau assuming you are using the "Driver upgrade mode" of the most recent script. NvApp crashed for me in relation to installing 572.83 as well. NvApp automatically launched after installation finished, but with a blocking error message (a dialog). Since NvApp launched immediately after driver install I did not have the the time to reapply the patch before NvApp launched.

It is unclear why the error message appeared at this point as the relevant files were at this time write-enabled (and they were indeed overwritten by the installer). My next step was to manually install NVIDIA_app_beta_v11.0.3.213, while still not having let the script patch files. I then received a similar error message while installing NvApp manually. However closing the error message etc and launching NvApp manually worked fine after this with no adverse effects noted. At this point I applied the patch again. It was now too late though for the patch and so I had to redo all my custom settings in NVPI (which is mostly just restoring the profiles NvApp creates to default)

So yeah I have a similar experience. I agree it seems plausible the script may have something to do with it, but then I don't know how/why since the idea of the "driver upgrade mode" is to remove the write-protection and ensure that the nvidia/nvapp installer can overwrite the files (which it did)

Thanks you, it's a bit confusing for me I do not know how to do but thanks for taking time to reply ;)

My driver 572.83 is already installed, I have uninstall all other nvidia stuff using BCU, and I will try to :

  1. Apply your patch (press 1)
  2. Install Nvidia App : NVIDIA_app_beta_v11.0.3.213
  3. Manually add the game for which I want to enable DLSS4 to nvidia App
  4. Quit nvidia app
  5. Apply your patch to get DLSS4 enable (press 2)
  6. Launch nvidia app and activate DLSS4 for the game in nvidia app

Seems correct to you ?

EDIT 1 :

So I tried what I wrote above.

I managed to launch NvidiaApp, but in the game I added, I couldn't change the DLSS (everything was blank : This game cannot be optimized... ).

After a while, I got an error message, and now NvidiaApp isn't working at all even if I quit and re-launch it...

So it seems that if we apply a patch after adding a game manually, NvidiaApp is not functionnal anymore... weird...

EDIT 2: Back to NvidiaApp v11.0.2.341 and all is OK now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment