请参考Q-04把bat文件保存为ANSI编码:
https://mp.weixin.qq.com/s/Koje4FufWxWBs7ioDy_LJA
Win10-Win11-NVIDIA最新驱动下载.bat- @echo off
- set "FileTemp=%temp%\BatHome.log"
- set "BaseURI=https://gfwsl.geforce.cn/services_toolkit/services/com/nvidia/services/AjaxDriverService.php"
- REM psid=120 # Geforce RTX 30 Series
- REM pfid=929 # RTX 3080
- REM osID=57 # Windows 10 64bit
- REM https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a
- REM languageCode=2052 # Chinese - People's Republic of China
- set "FullURI=%BaseURI%?func=DriverManualLookup&psid=120&pfid=929&osID=57&languageCode=2052&isWHQL=1&dch=1&sort1=0&numberOfResults=1"
- curl -o "%FileTemp%" "%FullURI%"
- for /f "delims=" %%i in ('powershell "(Get-Content '%FileTemp%' | ConvertFrom-Json).IDS[0].downloadInfo.Version"') do (
- set "VersionNum=%%i"
- )
- set "DownloadURL=https://cn.download.nvidia.com/Windows/%VersionNum%/%VersionNum%-desktop-win10-win11-64bit-international-dch-whql.exe"
- set "FileOut=%~dp0%VersionNum%-desktop-win10-win11-64bit-international-dch-whql.exe"
- bitsadmin /transfer myDownloadJob /download /priority foreground "%DownloadURL%" "%FileOut%"
复制代码 参考:https://github.com/lord-carlos/nvidia-update |