Announcement

Collapse
No announcement yet.

How to remove Windows Update 917013

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to remove Windows Update 917013

    Our WSUS 2 server just installed the update http://support.microsoft.com/kb/917013 onto some of our domain workstations. I would like to know if it is possible to remove this update?

    I have Declined the update in WSUS but it is either already intalled or waiting to be installed on workstations. Thanks.
    |
    +-- JDMils
    |
    +-- Regional Systems Engineer, DotNet programmer & Jack of all trades
    |

  • #2
    Re: How to remove Windows Update 917013

    Get the uninstall-string from the registry on one of the computers.

    Look for a subkey for the 'Windows Desktop Search' in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Uninstall\
    If you can't find the key then seach for the entry by the displayname of the program (as shown in add/remove programs).

    Script the uninstall-string as a computer startup script.
    1. check the registry if the key exist
    2. If exists uninstall the program

    http://www.microsoft.com/technet/pro...oot.mspx#E4KAC

    \Rems


    - EDIT -

    The script below checks whether WDS 3.01 is installed, then it deletes it (it requires a reboot!)
    You can run it on every client, if WDS is not installed, nothing will happen.
    Code:
    ' Name  : Uninst-KB917013.vbs
    ' Author: Remco Simons [NL] 2007
    '
    '  ( http://forums.petri.com/showthread.php?t=19210 )
    
    ' copy the script to the local computer at start-up (Xcopy /y /D "\\source\file" "destination\")
    ' and use a GPO to run the copied file as a computer-Shutdownscript
    
    'Uninstall 'Windows Desktop Search' v3.01 (KB917013)
    strDisplayName = "Windows Desktop Search 3.01"  '(from the 'Add/Remove programs' panel)
    
    const HKEY_LOCAL_MACHINE = &H80000002
    strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
    
    On Error Resume Next
    Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!"_
         & "root\default:StdRegProv")
    
    objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
    For Each subkey In arrSubKeys
      objReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath & "\" & subkey, _
             "DisplayName", DisplayName
      objReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath & "\" & subkey, _
             "UninstallString", UninstallString
      If Not IsNull(DisplayName) AND Not IsNull(UninstallString) Then
        If UCase(DisplayName) = UCase(strDisplayName) Then
          Set WSHShell = wscript.CreateObject("WScript.Shell")
    
          If InStr(Trim(UCase(UninstallString)), "MSIEXEC") = 1 then
            pos = instr(Ucase(UninstallString), "{")
            UninstallString = "MsiExec.exe /x " _
                     & Mid(UninstallString, pos) _
                     & " /quiet /passive /norestart /l*" _
                     & " ""c:\uninst-KB917013.log"""
          Else
             UninstallString = UninstallString _
                     & " /quiet /passive /norestart /log:" _
                     & """c:\uninst-KB917013.log"""
          End If
          WSHShell.run (UninstallString), 1, True
          Exit For
        End If
      End If
    Next
    Wscript.Quit 0
    You can use this as a Computer Shutdown script
    If it won't work for you as a shutdown script, then use psExec or CPAU to execute the script on all the remote computers with alternate credentials.

    - EDIT -
    The script above first determine if WDS was installed by an exe of msi setup,
    The script will also try to uninstall WDS when it was installed by a MSI package. This will not clean what is in other user profiles. I would recomment to use a MSIZAP.EXE command line to uninstall WDS when it was installed by an MSI.



    An other way to uninstall a program is using the Win32_Product Windows Management Instrumentation class:
    - "Delete software on a computer by script"

    More ( thebackroomtech.wordpress.com November 17, 2007 );
    Windows Desktop Search 3.01 removal methods
    Last edited by Rems; 10th January 2008, 21:02. Reason: added the link to: thebackroomtech.wordpress.com

    This posting is provided "AS IS" with no warranties, and confers no rights.

    __________________

    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts

    Comment


    • #3
      Re: How to remove Windows Update 917013

      Rems,

      Thank you so much for the effort! That's exactly what I need.

      One problem I have is that the script will run in the user context and thus our users will not be able to execute the script at all. It works perfectly when the user is a local admin of their machine- which is VERY rare here.

      I'm going to look for a way to run the script with elevated privileges- if possible.
      |
      +-- JDMils
      |
      +-- Regional Systems Engineer, DotNet programmer & Jack of all trades
      |

      Comment


      • #4
        Re: How to remove Windows Update 917013

        Can you not add the script to a GPO as a computer start up script which should have the required permissions. Leave it running for a few weeks to ensure all clients have at least started up?

        Michael
        Michael Armstrong
        www.m80arm.co.uk
        MCITP: EA, MCTS, MCSE 2003, MCSA 2003: Messaging, CCA, VCP 3.5, 4, 5, VCAP5-DCD, VCAP5-DCA, ITIL, MCP, PGP Certified Technician

        ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

        Comment


        • #5
          Re: How to remove Windows Update 917013

          Originally posted by Rems View Post
          You can use this as a Computer Shutdown script
          If it won't work for you as a shutdown script, then use psExec or CPAU to execute the script on all the remote computers with alternate credentials.
          Several ways to run this script
          1. As a computer Shutdownscript (use a Shutdownscript because the uninstall requires a reboot to complete).
          2. You could use psexec.exe to launch the script from the server (then use also the /Passive switch)
          3. Create a domain\locAdmin account. Create also a domain\LocAdmins group and make the domain\locAdmin member of the group. Add domain\locAdmins group to the local group Administrators (with the use of 'restricted groups' in the computers GPO ). Run the script at user logoff some how with the alternate credentials
          4. Run a other script from the server that add a scheduled job to the client computers, that starts the script (use the /passive swith)
          5. You can copy the script to the client computers, then try to use the SWbemLocator object, to connect to- and run the script from- the client computers from a list with computernames retrieved from active directory.


          \Rems
          Last edited by Rems; 31st October 2007, 00:51.

          This posting is provided "AS IS" with no warranties, and confers no rights.

          __________________

          ** Remember to give credit where credit's due **
          and leave Reputation Points for meaningful posts

          Comment


          • #6
            Re: How to remove Windows Update 917013

            I modified the script a litttle bit (edited my previous reply!)

            Then,
            I tested the script as a Shutdownscript;
            1. First, I use a startupscript to copy the script file Uninst-KB917013.vbs to each client computer.
            2. I ran the local script file by a computer GPO as a Shutdownscript

            KB917013 was successfully uninstalled.


            \Rems

            This posting is provided "AS IS" with no warranties, and confers no rights.

            __________________

            ** Remember to give credit where credit's due **
            and leave Reputation Points for meaningful posts

            Comment


            • #7
              Re: How to remove Windows Update 917013

              Rems,

              I assume the user who was logged into your machine at the time of testing was a local admin or domain admin of the workstation? Coz I ran the script as a shutdown script, setup via GPO, and any user who was not a local admin, thus did not have access to the Uninstall folder (under C:\Windows) and it failed to run.
              |
              +-- JDMils
              |
              +-- Regional Systems Engineer, DotNet programmer & Jack of all trades
              |

              Comment


              • #8
                Re: How to remove Windows Update 917013

                I assume the user who was logged into your machine at the time of testing was a local admin or domain admin of the workstation?
                No, I tested it for both types of accounts, and it worked in both cases. The GPO is set on the computer's OU (because it is a shutdown script!), that is why the roll of the exlogged-on useraccount does not the mater here.
                Because it is a shutdown script, the script have to be on a local drive of the computer, it cannot be executed from a UNC path. So in the GPO the path of the script must point to a local drive, and make sure the script is copied during startup to the client computer.

                \Rems

                This posting is provided "AS IS" with no warranties, and confers no rights.

                __________________

                ** Remember to give credit where credit's due **
                and leave Reputation Points for meaningful posts

                Comment

                Working...
                X