Unpacking Software Livestream

Join our monthly Unpacking Software livestream to hear about the latest news, chat and opinion on packaging, software deployment and lifecycle management!

Learn More

Chocolatey Product Spotlight

Join the Chocolatey Team on our regular monthly stream where we put a spotlight on the most recent Chocolatey product releases. You'll have a chance to have your questions answered in a live Ask Me Anything format.

Learn More

Chocolatey Coding Livestream

Join us for the Chocolatey Coding Livestream, where members of our team dive into the heart of open source development by coding live on various Chocolatey projects. Tune in to witness real-time coding, ask questions, and gain insights into the world of package management. Don't miss this opportunity to engage with our team and contribute to the future of Chocolatey!

Learn More

Calling All Chocolatiers! Whipping Up Windows Automation with Chocolatey Central Management

Webinar from
Wednesday, 17 January 2024

We are delighted to announce the release of Chocolatey Central Management v0.12.0, featuring seamless Deployment Plan creation, time-saving duplications, insightful Group Details, an upgraded Dashboard, bug fixes, user interface polishing, and refined documentation. As an added bonus we'll have members of our Solutions Engineering team on-hand to dive into some interesting ways you can leverage the new features available!

Watch On-Demand
Chocolatey Community Coffee Break

Join the Chocolatey Team as we discuss all things Community, what we do, how you can get involved and answer your Chocolatey questions.

Watch The Replays
Chocolatey and Intune Overview

Webinar Replay from
Wednesday, 30 March 2022

At Chocolatey Software we strive for simple, and teaching others. Let us teach you just how simple it could be to keep your 3rd party applications updated across your devices, all with Intune!

Watch On-Demand
Chocolatey For Business. In Azure. In One Click.

Livestream from
Thursday, 9 June 2022

Join James and Josh to show you how you can get the Chocolatey For Business recommended infrastructure and workflow, created, in Azure, in around 20 minutes.

Watch On-Demand
The Future of Chocolatey CLI

Livestream from
Thursday, 04 August 2022

Join Paul and Gary to hear more about the plans for the Chocolatey CLI in the not so distant future. We'll talk about some cool new features, long term asks from Customers and Community and how you can get involved!

Watch On-Demand
Hacktoberfest Tuesdays 2022

Livestreams from
October 2022

For Hacktoberfest, Chocolatey ran a livestream every Tuesday! Re-watch Cory, James, Gary, and Rain as they share knowledge on how to contribute to open-source projects such as Chocolatey CLI.

Watch On-Demand

Downloads:

821

Downloads of v 1.0:

821

Last Update:

26 Nov 2015

Package Maintainer(s):

Software Author(s):

  • NVIDIA

Tags:

graphics card driver geforce nvidia

Geforce Driver

  • 1
  • 2
  • 3

1.0 | Updated: 26 Nov 2015

Downloads:

821

Downloads of v 1.0:

821

Maintainer(s):

Software Author(s):

  • NVIDIA

Geforce Driver 1.0

  • 1
  • 2
  • 3

Some Checks Have Failed or Are Not Yet Complete

Not All Tests Have Passed


Validation Testing Passed


Verification Testing Failed

Details

Scan Testing Successful:

No detections found in any package files

Details
Package Approved

This package was approved by moderator doc on 31 Dec 2015.

WARNING

This package is unlisted and hidden from package listings.

Description

Automatically detects and installs most up-to-date NVIDIA GeForce driver for your graphics card.

Important note

Always install with --force parameter - this package doesn't contain any driver URL. It searches for newest non-beta driver for your graphics card on NVIDIA webpage. That's why package version will be updated only with fixes.

Package parameters

The following package parameters can be set:

  • nogfexp - do not install GeForce Experience

These parameters can be passed to the installer with the use of --params.
For example: --params "nogfexp".


tools\chocolateyInstall.ps1
$packageName = 'geforce-driver'
$fileType = 'exe'
$silentArgs = '-s -noreboot'
$packageParameters = $env:chocolateyPackageParameters

$scriptDir = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
Import-Module (Join-Path $scriptDir "functions.ps1")

$url = Get-DriverUrl

if ($url) {
  $tempDir = Join-Path $env:TEMP "$packageName"
  if (![System.IO.Directory]::Exists($tempDir)) { [System.IO.Directory]::CreateDirectory($tempDir) | Out-Null }
  $zip = Join-Path $tempDir "geforcedriver.zip"
  Get-ChocolateyWebFile $packageName $zip $url
  $installerDir = Join-Path $tempDir "Installer"
  Create-EmptyDirectory $installerDir
  Get-ChocolateyUnzip $zip $installerDir
  if ($packageParameters -like '*nogfexp*') {
    $path = Join-Path $installerDir "GFExperience"
    Remove-Recursively $path
    $path = Join-Path $installerDir "setup.cfg"
    $xml = [xml](Get-Content $path)
    foreach ($package in $xml.setup.install.'sub-package') {
      if ($package.name -eq "Display.GFExperience") {
        $package.ParentNode.RemoveChild($package)
      }
    }
    $xml.Save($path)
  }
  $file = Join-Path $installerDir 'setup.exe'
  Install-ChocolateyInstallPackage $packageName $fileType $silentArgs $file
  Remove-Recursively $installerDir
}
tools\functions.ps1
function Get-OsCode {
  return [string][Environment]::OSVersion.Version.Major + '.' + [string][Environment]::OSVersion.Version.Minor
}

function Get-GraphicsCardType ([string] $name) {
  if ($name -match '(M(X|\s+(LE|GTX|GTS|GS|GT|G))?$|GeForce Go)') {
    return 'notebook'
  } else {
    return 'desktop'
  }
}

function Get-DriverVersion ($card) {
  $infFilename = $card.InfFilename.Trim()
  $key = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey("SOFTWARE\NVIDIA Corporation\Installer2\Drivers\")
  if ($key) {
    $value = $key.GetValue($infFilename)
    if ($value) {
      $version = $value -replace ".+\/([\d\.]+).*\r?\n.*",'$1'
      if ($version -match "^[\d\.]+$") {
        return $version
      }
    }
  }
  return $Null
}

function Get-GraphicsCardInfo {
  $cards = @(gwmi win32_VideoController)
  foreach ($card in $cards) {
    $name = $card.Name.Trim()
    if ($name -match '^NVIDIA') {
      $name = $name.Replace('NVIDIA', '').Trim()
      $type = Get-GraphicsCardType $name
      $driverVersion = Get-DriverVersion $card
      return $name, $type, $driverVersion
    }
  }
  return $Null, $Null, $Null
}

function Get-SearchData ([string] $typeID, [string] $parentID) {
  # $typeID - 2 for series, 3 for card, 4 for system
  $url = 'http://www.nvidia.com/Download/API/lookupValueSearch.aspx?TypeID=' + $typeID + '&ParentID=' + $parentID
  $xml = Invoke-RestMethod -Uri $url
  return $xml.LookupValueSearch.LookupValues.LookupValue
}

function Get-Driver ([string] $seriesID, [string] $cardID, [string] $osID) {
  $url = "http://gfwsl.geforce.com/services_toolkit/services/com/nvidia/services/AjaxDriverService.php"
  $url += "?languageCode=1033&beta=0&dltype=-1&isWHQL=1&numberOfResults=1&sort1=0&func=DriverManualLookup"
  $url += "&psid=" + $seriesID + "&pfid=" + $cardID + "&osID=" + $osID
  $json = Invoke-RestMethod -Uri $url
  $info = $json.IDS[0].downloadInfo
  if ($info.Success -eq 1) {
    return $info.DownloadURL, $info.DetailsURL, $info.Version
  }
  return $Null, $Null, $Null
}

function Get-Reboot {
  $keys = (Get-ChildItem HKLM:\SOFTWARE -ea SilentlyContinue)
  foreach ($key in $keys) {
    if ($key.Name -match 'NVIDIA_RebootNeeded') {
      return $True
    }
  }
  return $False
}

function Remove-Recursively ([string] $path) {
  if ([System.IO.Directory]::Exists($path)) {
    $longPath = (Get-Item -LiteralPath $path).FullName
    Remove-Item $longPath -Recurse -Force
  }
}

function Create-EmptyDirectory ([string] $path) {
  Remove-Recursively $path
  [System.IO.Directory]::CreateDirectory($path) | Out-Null
}

function Get-DriverUrl {
  if(Get-Reboot) {
    Throw ("You need to restart computer before this installation.")
  }

  $cardName, $cardType, $currentDriverVersion = Get-GraphicsCardInfo
  $osCode = Get-OsCode
  $osBitness = [string](Get-ProcessorBits) + '-bit'

  $cardID = $Null
  $data = Get-SearchData 2 1
  foreach ($series in $data) {
    # limit series to desktop/notebook
    if ($cardType -eq 'notebook') {
      if ($series.Name -notlike '*notebook*') { continue }
    } else {
      if ($series.Name -like '*notebook*') { continue }
    }
    
    $seriesID = $series.Value
    $seriesCards = Get-SearchData 3 $seriesID
    foreach ($card in $seriesCards) {
      $name = $card.Name.Replace('NVIDIA', '').Trim()
      if ($name -eq $cardName) {
        $cardID = $card.Value
        break
      } elseif ($name -like "*/*") {
        if ((($name -replace "(\/|nForce).*$","").Trim() -eq $cardName) -or `
            (($name -replace "(?:[^\s]+\/|(?:[^\s]+\s+){2}\/|.*?(nForce))",'' -replace "\s+"," ").Trim() -eq $cardName)) {
          
          $cardID = $card.Value
          break
        }
      }
    }
    if ($cardID -ne $Null) { break }
  }
  if ($cardID -eq $Null) {
    Throw ("Could not find matching graphics card. " + $cardName)
  }

  $osID = $Null
  $oses = Get-SearchData 4 $seriesID
  foreach ($os in $oses) {
    if (($os.Code -eq $osCode) -and ($os.Name -match $osBitness)) {
      $osID = $os.Value
      break
    }
  }
  if ($osID -ne $Null) {
    $downloadUrl, $detailsUrl, $driverVersion = Get-Driver $seriesID $cardID $osID
  }

  if (($osID -eq $Null) -or ($downloadUrl -eq $Null)) {
    Throw ("Could not find driver for your OS. " + $cardName + "; " + $osCode + " " + $osBitness)
  }

  if ($currentDriverVersion -eq $driverVersion) {
    Write-Host "Most recent driver ($driverVersion) already installed."
    return $Null
  }
  #Write-Host $detailsUrl
  return $downloadUrl
}

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Add to Builder Version Downloads Last Updated Status

Discussion for the Geforce Driver Package

Ground Rules:

  • This discussion is only about Geforce Driver and the Geforce Driver package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Geforce Driver, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus