Git Product home page Git Product logo

nvidiaupdate's Introduction

nvidia-update

Checks for a new version of the NVIDIA Driver, downloads and installs it. Windows 10+ only and PowerShell 6+ recommended.

Fork of lord-carlos/nvidia-update.

Usage

  • Download the latest release; optional-components.cfg is optional
  • If downloaded, modify optional-components.cfg to specify what optional components to include (e.g. PhysX; works like NVSlimmer)
    • If this file isn't present in the same directory as the script, only essential driver components (not listed in this file) will be installed
  • Right click nvidia-update.ps1 and select Run with PowerShell (or run with optional parameters via a terminal; see below)
  • If the script finds a newer version of the NVIDIA driver, it will download and install it

Optional parameters

  • -Clean - Remove any existing driver and its configuration data
  • -Msi - Enable message-signalled interrupts (MSI) after driver installation (must be enabled every time); requires elevation
  • -Schedule - Register a scheduled task to run this script weekly; arguments passed alongside this will be appended to the scheduled task action
  • -GpuId <string/int> - Manually specify product family (GPU) ID rather than determine automatically
  • -OsId <string/int> - Manually specify operating system ID rather than determine automatically
  • -Desktop - Override the desktop/notebook check and download the desktop driver; useful when using an external GPU or unable to find a driver
  • -Notebook - Override the desktop/notebook check and download the notebook driver
  • -DownloadDir <string> - The directory where the script will download and extract the driver package

How to pass optional parameters

  • While holding shift press right click in the folder with the script
  • Select Open PowerShell window here
  • Enter .\nvidia-update.ps1 <parameters> (ex: .\nvidia-update.ps1 -Clean -Directory "C:\NVIDIA")

Automatically running the script periodically

Run the following PowerShell command to download the latest release files and create a scheduled task to run the script weekly with no optional parameters:

Invoke-Expression (Invoke-WebRequest -Uri "https://github.com/ZenitH-AT/nvidia-update/raw/main/schedule.ps1")

To specify optional parameters for the scheduled task action, instead use a command like the following (example):

Invoke-Command -ScriptBlock ([ScriptBlock]::Create(".{$(Invoke-WebRequest -Uri "https://github.com/ZenitH-AT/nvidia-update/raw/main/schedule.ps1")} -Force -DownloadDir `"'C:\Users\user\NVIDIA download'`""))

Surrounding an argument with `"' and '`" is required if it has spaces.

Requirements / Dependencies

A supported archiver (7-Zip or WinRAR) is required to extract driver files.

How does the script check for the latest driver version?

It uses the NVIDIA AjaxDriverService.

Example:

https://gfwsl.geforce.com/services_toolkit/services/com/nvidia/services/AjaxDriverService.php?func=DriverManualLookup&pfid=877&osID=57&dch=1

  • pfid: Product Family (GPU) ID (e.g. GeForce RTX 3070: 933)
  • osID: Operating System ID (e.g. Windows 10 64-bit: 57)
  • dch: Windows Driver Type (Standard: 0; DCH: 1)

The pfid and osID are determined by reading files in the ZenitH-AT/nvidia-data repository, which queries the NVIDIA Download API (lookupValueSearch).

How does this differ from lord-carlos/nvidia-update?

  • The script can now self-update.
  • Getting the download link now uses NVIDIA's AjaxDriverService. DCH drivers are now supported and there is no risk of the script not working if NVIDIA changes the download URL format. RP packages are not supported.
  • The GPU's product family ID (pfid) and operating system ID (osID) can now be determined by reading files in the ZenitH-AT/nvidia-data repository, rather than using static values, as older GPUs may use different drivers.
  • The user can now choose what optional driver components to include in the installation using the optional-components.cfg file.
  • The user can now enable message-signalled interrupts after driver installation by setting the -Msi optional parameter.
  • Simplified and improved checking whether to use the desktop or notebook driver and implemented parameters to override the check.
  • Simplified and improved the archiver program check, download and installation.
  • Simplified the OS version and architecture ($osBits) check and driver version comparison.
  • Simplified the GPU name and driver version retrieval (Get-GpuData).
  • Simplified and improved the scheduled task creation; now supports PowerShell 6+.
  • The script now checks for an internet connection before proceeding.
  • Implemented a function for downloading files (Get-WebFile).
    • Driver downloading now uses this function, rather than Start-BitsTransfer, which occasionally caused issues.
  • Greatly improved error handling (script is now hopefully idiot-proof).
  • Loading animations are shown where applicable (e.g. "Installing driver... /").
  • Refactored and reorganised a ton of the code.
  • Implemented a few changes and fixes from the BearGrylls and fl4pj4ck forks, as well as TinyNvidiaUpdateChecker

Planned changes

  • Optional components should be selected from within the script and handle dependencies, like NVCleanstall.
    • Dependencies can be determined by recursively reading .nvi files
    • Will require implementing a simple TUI

nvidiaupdate's People

Contributors

zenith-at avatar lord-carlos avatar teoxoy avatar link-webcreations avatar asheingold avatar phixion avatar jkawmi avatar woomymy avatar honkinggoose avatar ojaswin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.