windows 10 - In VBScript, I need a code to subtract 1 from searchResult.Updates.Count, so that Count = 0 and WScript.Quit will be run consequently
I already googled for hours but failed to find the answer. 'ServerSelection values ssDefault = 0 ssManagedServer = 1 ssWindowsUpdate = 2 ssOthers = 3 'InStr values intSearchStartChar = 1 dim strTitle Set updateSession = CreateObject("Microsoft.Update.Session") Set updateSearcher = updateSession.CreateupdateSearcher() updateSearcher.ServerSelection = ssWindowsUpdate Set searchResult = updateSearcher.Search("IsInstalled=0 and Type='Software'") For I = 0 To searchResult.Updates.Count-1 Set update = searchResult.Updates.Item(I) If update.Title = "Intel Corporation driver update for Intel(R) HD Graphics" Then I need a code on this line to subtract 1 from searchResult.Updates.Count, so that Count = 0 and WScript.Quit will be run consequently. End If If searchResult.Updates.Count = 0 Then WScript.Quit End If set objShell = createobject("wscript.shell") objShell.Run("ms-settings:windowsupdate") , 0 Next WScript.Qui...