Batch Update Uninstaller - Uninstall Forced Win10 & Telemetry - Page 3 - Overclock.net - An Overclocking Community
Forum Jump: 

Batch Update Uninstaller - Uninstall Forced Win10 & Telemetry

Reply
 
Thread Tools
post #21 of 399 (permalink) Old 09-08-2015, 10:02 PM
New to Overclock.net
 
agawthrop's Avatar
 
Join Date: Nov 2014
Location: Huntington, WV
Posts: 242
Rep: 51 (Unique: 18)
Do me a favor and on that same line you changed it to 0, set it back to 1 and remove the /quiet tag. Run it and it should give you the error.
agawthrop is offline  
Sponsored Links
Advertisement
 
post #22 of 399 (permalink) Old 09-08-2015, 10:08 PM - Thread Starter
InstantAli3n
 
cookieboyeli's Avatar
 
Join Date: Sep 2013
Posts: 2,002
Rep: 150 (Unique: 110)
Oh boy... I'l just upload a screenshot...


There we go.
cookieboyeli is offline  
post #23 of 399 (permalink) Old 09-08-2015, 10:14 PM
New to Overclock.net
 
agawthrop's Avatar
 
Join Date: Nov 2014
Location: Huntington, WV
Posts: 242
Rep: 51 (Unique: 18)
I can't read the error messages. It looks like it says something about only one instance can be run at a time?
agawthrop is offline  
Sponsored Links
Advertisement
 
post #24 of 399 (permalink) Old 09-08-2015, 10:16 PM - Thread Starter
InstantAli3n
 
cookieboyeli's Avatar
 
Join Date: Sep 2013
Posts: 2,002
Rep: 150 (Unique: 110)
I don't know how to make the image appear in full resolution in a post, but If you click it you can hit original and see the full thing.
cookieboyeli is offline  
post #25 of 399 (permalink) Old 09-08-2015, 10:28 PM
New to Overclock.net
 
agawthrop's Avatar
 
Join Date: Nov 2014
Location: Huntington, WV
Posts: 242
Rep: 51 (Unique: 18)
Got it. Thanks. That's interesting that it says it's required and cannot be uninstalled. I was able to uninstall that update at work. It is a security update to IE. I was just using those two to test since they were the most recently installed. I'll be reinstalling them later. You might try changing the txt file to the list you had before and seeing if it works. Obviously it's going to fail on the part that it has two instances running, but I think I may have a work around on that. Just can't test it here.
agawthrop is offline  
post #26 of 399 (permalink) Old 09-08-2015, 10:30 PM
New to Overclock.net
 
agawthrop's Avatar
 
Join Date: Nov 2014
Location: Huntington, WV
Posts: 242
Rep: 51 (Unique: 18)
Try this for the VBScript file:
Code:
On Error Resume Next
'Kills script if ran with no arguments
If WScript.Arguments.Count < 1 Then
        Wscript.Quit
End if

Dim sysNativePath
sysNativePath = WScript.Arguments(1)

Dim fso, kbList, kb, kbID, kbArray()

'Pull the KBs from kbList.txt into an Array
Set fso = CreateObject("Scripting.FileSystemObject")
Set kbList = fso.OpenTextFile(WScript.Arguments(0))
i=0

Do Until kbList.AtEndOfStream
        'skips the first 2 lines of kbList.txt due to instructions
    If i <= 1 Then 
        kbList.ReadLine
    Else    
        kb = kbList.ReadLine
        Redim Preserve kbArray(i-2) 'i-2 because we skip the first two lines of text
        kbArray(i-2) = Left(kb,7)
    End If
    i = i+1
Loop
kbList.Close

Dim numUpdates
numUpdates = i-3

'Loop through each KB in list and uninstall if installed
Dim iFail
iFail = 0
WScript.Echo "Uninstalling" & numUpdates & " Updates..."
For Each kbID in kbArray
        If Not uninstallKb(kbID) Then
                iFail = iFail + 1
        End If
Next
If iFail > 0 Then
        Dim numSuccess
        numSuccess = numUpdates - iFail
        WScript.Echo numSuccess & " updates have been uninstalled."
        WScript.Echo iFail & " updates failed to uninstall."
Else
        Wscript.Echo "All updates have been uninstalled."
End If

'Hide the updates
WScript.Echo "Hiding Updates..."
If hideUpdates(kbArray) Then
        WScript.Echo "Updates have been hidden."
Else
        WScript.Echo "Some updates were hidden."
End If

'Funtion to uninstall the KB
Function uninstallKb(kbID)
    Dim objShell, objExec, uFail
        If getKbID(kbID)= True Then
        Set objShell = CreateObject("Shell.Application")
        WScript.StdOut.Write "Uninstalling KB" & kbID & "..."
                objshell.ShellExecute "Cmd", "/c " & sysNativePath & "\wusa.exe /kb:" & kbID & " /uninstall /quiet /norestart","","runas",0
        Do 
                        WScript.Sleep 5000 'wait 5 seconds before checking if uninstall is complete
                Loop Until stillRunning = False
                If getKbID(kbID) Then
            Wscript.Echo "Failed"
                        uFail = True
        Else
            Wscript.Echo "Completed"
        End If
        Else
                Wscript.Echo "Update KB" & kbID & " is not installed."
        End If  
        If ufail Then
                uninstallKb = False
        Else
                uninstallKb = True
        End If
End Function

'Function to see if the uninstall command is still processing
Function stillRunning
        Set service = GetObject("winmgmts:")
        For Each process in service.InstancesOf("Win32_Process")
                If process.Name = "wusa.exe" Then
                        running = True
                        Exit For
                End If
        Next
        If running Then
                stillRunning = True
        Else
                stillRunning = False
        End If
End Function

'Function to check if the current KB is installed
Function getKbID(kbID)
    Dim strComputer, objService, Items, Item
    strComputer = "."     
    Set objService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set Items = objService.ExecQuery("Select * from Win32_QuickFixEngineering where HotFixID = 'KB" & kbID & "'")
    For Each Item in Items
        If InStr(UCase(Item.HotFixID),UCase("KB" & kbID)) > 0 Then
            Installed = True
        End If
    Next
    If Installed Then
        getkbID = True
    Else
        getkbID = False
    End If
End Function

'Function searches for uninstalled KBs
Function hideUpdates(kbArray)
        Dim uSession, uSearcher, uResults, uItem, uItemID, i2, i3, found
        Set uSession = CreateObject("Microsoft.Update.Session")
        Set uSearcher = uSession.CreateUpdateSearcher()
        Wscript.StdOut.Write "Searching for pending updates..."
        Set uResults = uSearcher.Search("IsInstalled=0")
        Wscript.Echo Cstr(uResults.Updates.Count) & " found."
                For Each kb in kbArray
                        Found = False
                        Wscript.StdOut.Write "Searching pending updates for KB" & kb & "..."
                        For i2 = 0 To uResults.Updates.Count - 1
                                Set uItem = uResults.Updates.Item(i2)
                                If InStr(UCase(uItem.Title),UCase("KB" & kb)) <> 0 Then
                                        Found = True
                                        If uItem.IsHidden = False Then
                                                Wscript.StdOut.Write "Hiding update..."
                                                uItem.IsHidden = True
                                                Wscript.Echo "Hidden"
                                        Else
                                                Wscript.Echo "Update is already hidden."
                                        End If
                                        Exit For
                                End If
                        Next
                        If found = False Then
                                WScript.Echo "No Such Update Found"
                                hideUpdates = False
                        Else
                                hideUpdates = True
                        End If
        Next
End Function
agawthrop is offline  
post #27 of 399 (permalink) Old 09-08-2015, 10:40 PM - Thread Starter
InstantAli3n
 
cookieboyeli's Avatar
 
Join Date: Sep 2013
Posts: 2,002
Rep: 150 (Unique: 110)
Ok, I ran it without quiet and got a fail for 2976978 - Telemetry for Win8/8.1 with the same "required by your computer" error. Unfortunately I ran it once and it did something different but I didn't capture it quick enough...

EDIT: Ok this is pretty close to the first time. I think the difference was it uninstalled one and hid one.



What does pending updates mean? All other updates except the ones on this list are installed. EDIT: lol forgot it was patch Tuesday! doh.gif 14 updates plus 9 hidden updates only gives us 23 though... strange.
I'm increasing the timeout back to 30 seconds until there is either a log or a "Press any key or program will exit" feature. I don't want to miss it again.
cookieboyeli is offline  
post #28 of 399 (permalink) Old 09-08-2015, 11:03 PM
New to Overclock.net
 
agawthrop's Avatar
 
Join Date: Nov 2014
Location: Huntington, WV
Posts: 242
Rep: 51 (Unique: 18)
So were making progress!

Pending is all outstanding updates per Windows Update. It's searching for all updates that are not installed, whether they are hidden or not. Once it gets that list it checks kbList against it.

I'm not really sure why when you uninstall an update it's not immediately pending, but that appears to be the case. You may check windows update and see what all is there.
agawthrop is offline  
post #29 of 399 (permalink) Old 09-08-2015, 11:19 PM - Thread Starter
InstantAli3n
 
cookieboyeli's Avatar
 
Join Date: Sep 2013
Posts: 2,002
Rep: 150 (Unique: 110)
Searching google for this error yields no helpful information. I'll keep looking, there's got to be a way to override.


Ok I found something, I guess I already knew this. But just to confirm this guide is uninstalling the update without a hitch.
http://www.ghacks.net/2015/04/17/how-to-remove-windows-10-upgrade-updates-in-windows-7-and-8/

When trying to uninstall it through installed updates the uninstall button disappears.
It says it was installed on 9/7/15, now I could be wrong, but I ran the original uninstaller before then so if it was installed it should have installed. But the original had no feedback so we don't know. Maybe it was never installed before 9/7/15.
cookieboyeli is offline  
post #30 of 399 (permalink) Old 09-09-2015, 12:28 AM - Thread Starter
InstantAli3n
 
cookieboyeli's Avatar
 
Join Date: Sep 2013
Posts: 2,002
Rep: 150 (Unique: 110)
Quote:
Originally Posted by agawthrop View Post

So were making progress!

Pending is all outstanding updates per Windows Update. It's searching for all updates that are not installed, whether they are hidden or not. Once it gets that list it checks kbList against it.

I'm not really sure why when you uninstall an update it's not immediately pending, but that appears to be the case. You may check windows update and see what all is there.
Yes indeed! biggrin.gif

I knew what pending meant, I was just confused and thought it must mean something else because I was sure I had no pending updates. redface.gif

When you say "searching for all updates that are not installed" it's searching WinSxS right?

What if some have been tampered with? It's possible to uninstall updates you're not using. I think I may have uninstalled deleted a few packages the other day. Why leave them hanging around? It's like cleaning a downloads folder really.


EDIT: WAIT A SECOND! KB2976978 says it's installed in the installed updates list, but hidden in the uninstalled updates list! lmaosmiley.gif Which could it be? I guess I'll unhide it and see if that changes anything...
cookieboyeli is offline  
Reply

Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the Overclock.net - An Overclocking Community forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.
User Name:
If you do not want to register, fill this field only and the name will be used as user name for your post.
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself.
Email Address:

Log-in



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off