;安装NVIDIA显卡驱动
Local $NVIDIA = 'D:\NVIDIA显卡驱动\390.77-notebook-win10-64bit-international-whql\setup.exe'
If FileExists("C:\Program Files\NVIDIA Corporation\Control Panel Client\nvcplui.exe") = 0 and FileExists($NVIDIA) Then ;若安装文件存在但默认(或指定)路径未发现安装
ShellExecute(_WinAPI_PathFindFileName($NVIDIA), "", _WinAPI_PathRemoveFileSpec($NVIDIA), "open", @SW_SHOWNORMAL) ;运行安装程序
WinWait("[CLASS:NVISetupFrame]", "同意并继续(&A)")
Sleep(250)
Local $aPos = WinGetPos("[CLASS:NVISetupFrame]")
Sleep(250)
MouseClick("", $aPos[0] + 418, $aPos[1] + 413, 1, 1) ;ControlClick("[CLASS:NVISetupFrame]", "同意并继续(&A)", "[CLASS:ATL:6D480618; INSTANCE:2]") ;点击同意并继续
WinWait("[CLASS:NVISetupFrame]", "精简(&E)(推荐)")
Sleep(250)
MouseClick("", $aPos[0] + 429, $aPos[1] + 412, 1, 1) ;ControlClick("[CLASS:NVISetupFrame]", "精简(&E)(推荐)", "[CLASS:ATL:6D480618; INSTANCE:2]") ;点击下一步
WinWait("[CLASS:NVISetupFrame]", "关闭(&C)") ;等待安装完毕
Sleep(250)
MouseClick("", $aPos[0] + 192, $aPos[1] + 156, 1, 1) ;ControlClick("[CLASS:NVISetupFrame]", "关闭(&C)", "[CLASS:ATL:6D476650; INSTANCE:1]", 'left', 1, 10, 10) ;点击取消勾选创建桌面快捷方式
Sleep(250)
MouseClick("", $aPos[0] + 192, $aPos[1] + 182, 1, 1) ;ControlClick("[CLASS:NVISetupFrame]", "关闭(&C)", "[CLASS:ATL:6D476650; INSTANCE:1]", 'left', 1, 10, 35) ;点击取消勾选启动Experience
Sleep(250)
MouseClick("", $aPos[0] + 533, $aPos[1] + 412, 1, 1) ;ControlClick("[CLASS:NVISetupFrame]", "关闭(&C)", "[CLASS:ATL:6D480618; INSTANCE:2]") ;点击关闭
WinWaitClose("[CLASS:NVISetupFrame]", "关闭(&C)")
EndIf