Presenting… StartComponentCleanup for MSI (including Office)

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

Tags:
  1. 600415

    600415 MDL Member

    Joined:
    Aug 31, 2015
    Messages:
    191
    Likes Received:
    239
    Trophy Points:
    10
    #1 600415, Aug 11, 2018
    Last edited: Sep 12, 2018
  2. abbodi1406

    abbodi1406 MDL KB0000001

    Joined:
    Feb 19, 2011
    Messages:
    12,067
    Likes Received:
    55,424
    Trophy Points:
    340
  3. ch100

    ch100 MDL Addicted

    Joined:
    Sep 11, 2016
    Messages:
    629
    Likes Received:
    523
    Trophy Points:
    30
  4. 600415

    600415 MDL Member

    Joined:
    Aug 31, 2015
    Messages:
    191
    Likes Received:
    239
    Trophy Points:
    10
  5. ch100

    ch100 MDL Addicted

    Joined:
    Sep 11, 2016
    Messages:
    629
    Likes Received:
    523
    Trophy Points:
    30
    PatchCleaner has an option to move files to a backup location.
     
  6. 600415

    600415 MDL Member

    Joined:
    Aug 31, 2015
    Messages:
    191
    Likes Received:
    239
    Trophy Points:
    10
  7. ch100

    ch100 MDL Addicted

    Joined:
    Sep 11, 2016
    Messages:
    629
    Likes Received:
    523
    Trophy Points:
    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.
     
  8. Mr.X

    Mr.X MDL Guru

    Joined:
    Jul 14, 2013
    Messages:
    7,625
    Likes Received:
    14,952
    Trophy Points:
    240
    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.
     
  9. Tovadyk

    Tovadyk MDL Junior Member

    Joined:
    Jul 21, 2015
    Messages:
    51
    Likes Received:
    25
    Trophy Points:
    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...
     
  10. 600415

    600415 MDL Member

    Joined:
    Aug 31, 2015
    Messages:
    191
    Likes Received:
    239
    Trophy Points:
    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.
     
  11. 600415

    600415 MDL Member

    Joined:
    Aug 31, 2015
    Messages:
    191
    Likes Received:
    239
    Trophy Points:
    10
    Updated tha script to add permanent patch detection and (optional) “force” removal for all yer Silverlight and Adobe Reader goodness.
     
  12. STaRDoGG

    STaRDoGG MDL Novice

    Joined:
    Dec 2, 2015
    Messages:
    10
    Likes Received:
    2
    Trophy Points:
    0
    Out of curiosity, is this better than doing ... ?

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

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

    Enthousiast MDL Tester

    Joined:
    Oct 30, 2009
    Messages:
    35,561
    Likes Received:
    59,621
    Trophy Points:
    450
    Do those commands cleanup superseded MSP patches (for office)?
     
  14. STaRDoGG

    STaRDoGG MDL Novice

    Joined:
    Dec 2, 2015
    Messages:
    10
    Likes Received:
    2
    Trophy Points:
    0
    Dunno, that's why I was asking ... ;)
     
  15. Enthousiast

    Enthousiast MDL Tester

    Joined:
    Oct 30, 2009
    Messages:
    35,561
    Likes Received:
    59,621
    Trophy Points:
    450
    It was more of a rhetorical question;):D
     
  16. ch100

    ch100 MDL Addicted

    Joined:
    Sep 11, 2016
    Messages:
    629
    Likes Received:
    523
    Trophy Points:
    30
  17. STaRDoGG

    STaRDoGG MDL Novice

    Joined:
    Dec 2, 2015
    Messages:
    10
    Likes Received:
    2
    Trophy Points:
    0
    You're just wayyy too smart for me, man ... ;)
     
  18. Mr.X

    Mr.X MDL Guru

    Joined:
    Jul 14, 2013
    Messages:
    7,625
    Likes Received:
    14,952
    Trophy Points:
    240
    How to run this?

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

    ch100 MDL Addicted

    Joined:
    Sep 11, 2016
    Messages:
    629
    Likes Received:
    523
    Trophy Points:
    30
    cscript <filename>.vbs
     
  20. Mr.X

    Mr.X MDL Guru

    Joined:
    Jul 14, 2013
    Messages:
    7,625
    Likes Received:
    14,952
    Trophy Points:
    240
    I did that. Didn't work.