Windows#

The NVIDIA Display Driver for Windows can be installed or uninstalled silently using command-line options.

Silent Installation#

To install the display driver silently, use the following command:

setup.exe -s -n Display.Driver

This suppresses the installer UI and installs only the display driver.

Enabling Logs#

To enable logging during installation, add the following options:

setup.exe -s -n Display.Driver -log:c:\logs -loglevel:6

This command saves installation logs to the specified directory (c:\logs) with a log level of 6.

Silent Uninstallation#

To silently uninstall the display driver, run:

"C:\Windows\SysWOW64\RunDll32.EXE" "C:\Program Files\NVIDIA Corporation\Installer2\InstallerCore\NVI2.DLL",UninstallPackage Display.Driver -silent -n

The -n option suppresses the reboot prompt.

Exit Codes#

After installation or uninstallation, check the exit code:

  • 0: Success

  • 1: Success, but reboot required

  • Any other value: Failure

Exit Code on Silent Uninstallation#

To capture the correct exit code when running silent uninstallation, use the following PowerShell command instead of invoking RunDll32 directly:

$process = Start-Process -FilePath "C:\Windows\SysWOW64\RunDll32.EXE" `
  -ArgumentList '"C:\Program Files\NVIDIA Corporation\Installer2\InstallerCore\NVI2.DLL",UninstallPackage Display.Driver', '-silent', '-n' `
  -Wait -PassThru

Write-Output "Exit Code: $($process.ExitCode)"

This method ensures the uninstall process runs to completion and returns an accurate exit status.