|
So annoying, yes. I since uninstalled GeForce Experience and replaced update notifications (the only feature I was using) with this ugly batch script. Careful, it's ugly! Botched stackoverflow-oriented batch brogramming! But it works for me! Feel free to reuse and improve :) @ECHO OFF
setLocal EnableDelayedExpansion
rem nvup.bat, a quick & dirty driver downloader since GeForce Experience requires a login.
rem In a folder with write permissions, drop the script and its two dependencies:
rem - jq: https://stedolan.github.io/jq/
rem - curl: https://curl.haxx.se/
rem For automation, just create a Scheduled Task that runs when you want it (I like on Resume).
rem Reuse / modify / redistribute at will.
rem http://stackoverflow.com/questions/19131029/how-to-get-date-in-bat-file
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"
set "datestamp=%YYYY%%MM%%DD%" & set "timestamp=%HH%%Min%%Sec%"
set "fullstamp=%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%"
echo lastCheck: "%fullstamp%" > lastCheck.log
rem to get the update feed for your device/OS combo, go to http://www.geforce.com/drivers
rem , pick your device/os, pop the "Network" tab of your devtools, start the driver search,
rem and copy the url
curl --silent -o rawNv.json "http://www.geforce.com/proxy?..."
for /f "delims=" %%i in ('jq ".IDS[0].downloadInfo.DownloadURL" rawNv.json') do set lastUrl=%%i
set /p installedUrl=< installedUrl.txt
if %installedUrl%==%lastUrl% (
echo same version, quitting
exit /B
) else (
echo new version, updating
echo %lastUrl% > installedUrl.txt
pushd C:\Users\YOURUSERNAME\Downloads
%~dp0\curl -O %lastUrl%
popd
rem http://stackoverflow.com/questions/774175/show-a-popup-message-box-from-a-windows-batch-file
mshta "javascript:alert('New driver');close()"
)
|