$URI = 'http://www.geforce.com/proxy?proxy_url=http%3A%2F%2Fgfwsl.geforce.com%2Fservices_toolkit%2Fservices%2Fcom%2Fnvidia%2Fservices%2FAjaxDriverService.php%3Ffunc%3DDriverManualLookup%26psid%3D101%26pfid%3D815%26osID%3D57%26languageCode%3D1078%26beta%3D0%26isWHQL%3D1%26dltype%3D-1%26sort1%3D0%26numberOfResults%3D10'
$Download = (Invoke-WebRequest $URI | ConvertFrom-Json | Select -ExpandProperty IDS)[0].downloadInfo.DownloadURL
# Installed driver version (21.21.13.7570) > NVIDIA driver version (375.70)
[Version]$Driver = (Get-WmiObject Win32_PnPSignedDriver | Select DeviceName, DriverVersion, Manufacturer | Where { $_.Manufacturer -eq "NVIDIA" -and $_.DeviceName -like "*GeForce GTX*" }).DriverVersion
[Version]$CurrentDriver = ("{0}{1}" -f $Driver.Build,$Driver.Revision).Substring(1).Insert(3,'.')
# Latest driver on NVIDIA's website
[Version]$LatestDriver = ([System.Uri]$Download).Segments[-2].Trim('/')
If ($CurrentDriver -lt $LatestDriver) {
Write-Output "New driver available"
Start-BitsTransfer -Source $Download -Destination "$env:USERPROFILE\Downloads"
(New-Object -ComObject WScript.Shell).Popup("New NVIDIA driver downloaded",0,"Update")
} Else {
Write-Output "Same version. Nothing to download"
}
Improvements welcome. :)So I have a few questions to you or knowledgeable PS-passersby:
1. Any recommendations to get started with PowerShell? Good documentation, tooling, linters, useful packages?
2. Are there remaining cases where it's impossible or unreasonable to use PowerShell rather than Batch or VBScript?
3. PS runs on Win≥XP, right? How does the language evolve / is it versioned? If so, which version should I target?
1a. with powershell as an administrator run `Update-Help` That's all the help for the commands installed and up to date from online. Get-help <command> and don't forget to use wildcards `get-help get-*` will show every single get command you can run. Get-Verb will show what you should expect things to be called. `Get-module -listAvailable` worth looking at too. Tab complete is your friend.
1b. This and the advenced one are great although quite slow; https://mva.microsoft.com/en-us/training-courses/getting-sta...
2. No? Maybe stuff that's already fine or where working out the signing policy is a hassle.
3. Powershell is wrapped into the "Windows Management Framework" you can install. WMF 5 has PS 5, can install down to Windows 7. 7 shipped with PS 2.0 where you could write cmdlets in powershell itself, before that you had to use C++ and visual studio. PS3.0 is the minimum it's really pleasant to use but 2.0 support isn't crazy.
2. Not really. Worst case, you can batch & co.
3. Probably v2.
Thank you for sharing your work with us!
There are some older versions of nvidea experience floating around that still work with shadowplay without the login.
It's replay buffer where you start the replay buffer and it will keep the last n seconds of footage in a buffer. You set a keybind to save that buffer to file.
https://obsproject.com/forum/resources/obs-classic-how-to-us...