Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Uninstalling hotfixes/updates  (Read 2898 times)

0 Members and 1 Guest are viewing this topic.

T.C.

    Topic Starter


    Beginner

    Thanked: 13
    Uninstalling hotfixes/updates
    « on: February 28, 2010, 12:04:59 AM »
    Win XP Pro SP.3 + all updates etc.

    For experimental purposes I'd like to delete all hotfixes etc using the $NTUninstallKB..... folders which have been created in the C:\Windows folder. 

    If in doing this the system is damaged it doesn't matter, it's a tryout machine only.

    Can someone please point me in the direction of instructions on how to write a batch script which can give the necessary responses to Spuninst.exe which consist of clicking the Next box on two occasions.

    I've tried this without success:
    Code: [Select]

    @echo off
    cls
    setlocal

    pushd c:\windows\$ntuninstallkb951748$\spuninst\

    echo echo. | spuninst.exe
    echo.


    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: Uninstalling hotfixes/updates
    « Reply #1 on: February 28, 2010, 07:05:19 AM »
    Notice: This solution is only for the original poster. Do not run this on your own machine.

    Spuninst has a set of switches (spuninst /?) that run the program in passive or silent mode, and also not to restart after an uninstall.

    Code: [Select]
    @echo off
    pushd %cd%
    for /f "tokens=*" %%a in ('dir c:\windows\$nt* /b /s /a:d') do (
      cd %%a
      if exist .\spuninst (
        cd spuninst
        spuninst /passive /norestart
      )
    )   
    popd   

    I didn't do a live test of the code (for obvious reasons), but substituted echo statements at critical points.

    Good luck and be careful.  8)
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein

    T.C.

      Topic Starter


      Beginner

      Thanked: 13
      Re: Uninstalling hotfixes/updates
      « Reply #2 on: February 28, 2010, 10:05:42 AM »
      Thank you Sidewinder.   I've found that SpUninst.exe supports some of the shortened Setup.exe switches so will try them as well:

      Quote from: KB886185
      The utility supports the following Setup switches:

          * /? : Show the list of installation switches.
          * /u : Use Unattended mode.
          * /f : Force other programs to quit when the computer shuts down.
          * /z : Do not restart when the installation is completed.
          * /q : Use Quiet mode (no user interaction).

      T.C.

        Topic Starter


        Beginner

        Thanked: 13
        Re: Uninstalling hotfixes/updates
        « Reply #3 on: March 02, 2010, 11:47:13 PM »
        Back to report that installation and deletion of hotfixes went without a hitch.

        Thanks again.