Presenting… StartComponentCleanup for MSI (including Office)

Discussion in 'MDL Projects and Applications' started by 600415, Aug 11, 2018.

Tags:
  1. 600415

    600415 MDL Member

    Aug 31, 2015
    214
    259
    10
    #1 600415, Aug 11, 2018
    Last edited: Sep 12, 2018
  2. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,197
    84,757
    340
  3. ch100

    ch100 MDL Addicted

    Sep 11, 2016
    829
    694
    30
    PatchCleaner has an option to move files to a backup location.
     
  4. ch100

    ch100 MDL Addicted

    Sep 11, 2016
    829
    694
    30
    If there is no better alternative to the superseded Office patches cleanup and the script is given all clear, I would suggest that this script should be given more attention and made a sticky or a reference in any other way on this forum. Otherwise it will get lost among other less relevant threads.
    I know of few other alternatives to clean superseded msp/msi, one which I mentioned here, but this script seems to be the most complete way to clean up Office patches as far as I know.
    For Windows we have the official way, but not for Office.
     
  5. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,575
    15,646
    270
    Saving whatever amount of GBs is always good. Specially for those like me who relies on imaging (system image). Less R/W to the HDD, cool.
     
  6. Tovadyk

    Tovadyk MDL Junior Member

    Jul 21, 2015
    54
    26
    0
    #9 Tovadyk, Aug 15, 2018
    Last edited: Aug 16, 2018
    Tried it on O2013x86 and Win81x64 - works well - ran as cscript c:\temp\clean.vbs
    On most msi stores it gave a 1646 return code and I recovered about 15 GB

    When used with O2010 the return code is almost always 0...
     
  7. 600415

    600415 MDL Member

    Aug 31, 2015
    214
    259
    10
    I'm going to add permanent update detection when i have time. Then it should skip them and not give error 1646.

    Or, given how patch sequencing works (content of superseded updates is completely disregarded when doing any repair on the product, therefore their uninstall is almost a no-op) i could add a “dangerous” option that would mark such an update as uninstallable and then uninstall it.

    I have for now tested this manually with adobe reader and it still worked afterwards.
     
  8. 600415

    600415 MDL Member

    Aug 31, 2015
    214
    259
    10
    Updated tha script to add permanent patch detection and (optional) “force” removal for all yer Silverlight and Adobe Reader goodness.
     
  9. STaRDoGG

    STaRDoGG MDL Novice

    Dec 2, 2015
    13
    3
    0
    Out of curiosity, is this better than doing ... ?

    Code:
    DISM /Online /Cleanup-Image /SPSuperseded
    and/or

    Code:
    DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase
     
  10. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,256
    94,672
    450
    Do those commands cleanup superseded MSP patches (for office)?
     
  11. STaRDoGG

    STaRDoGG MDL Novice

    Dec 2, 2015
    13
    3
    0
    Dunno, that's why I was asking ... ;)
     
  12. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,256
    94,672
    450
    It was more of a rhetorical question;):D
     
  13. STaRDoGG

    STaRDoGG MDL Novice

    Dec 2, 2015
    13
    3
    0
    You're just wayyy too smart for me, man ... ;)
     
  14. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,575
    15,646
    270
    How to run this?

    I already saved the lines in a notepad with .vbs extension, didn't work.
     
  15. ch100

    ch100 MDL Addicted

    Sep 11, 2016
    829
    694
    30
    cscript <filename>.vbs
     
  16. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,575
    15,646
    270
    I did that. Didn't work.