Package & Telemetry Removal Guide v1.0

Discussion in 'Windows 10' started by dobbelina, Aug 13, 2016.

  1. dobbelina

    dobbelina MDL Senior Member

    Apr 2, 2009
    426
    526
    10
    Sorry, I saw the messup, was kinda tired when I wrote it.
    I have edited it to be more correct.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. KNARZ

    KNARZ MDL Addicted

    Oct 9, 2012
    895
    482
    30
    I think you got me wrong. In my last post I wantd to say that with intsall_wim_tweak there are problems without the additional switches.
    And also if I remember right. The count of files is different with /c /r switch in compare to using dism /remove-packag on the same package. But I didn't look deeper into it with 10240.
     
  3. slayer9450

    slayer9450 MDL Member

    Aug 3, 2015
    211
    87
    10
  4. KNARZ

    KNARZ MDL Addicted

    Oct 9, 2012
    895
    482
    30
    Yeah I'm also searching for a GOOD working TI impersonate application with working command line option.
    TIRunasToken and so on are okay but no real good solution.
     
  5. T-S

    T-S MDL Guru

    Dec 14, 2012
    3,984
    1,331
    120

    Just download the wmc package from my signature, you will find a one click batch to launch a command prompt in the current directory with one click.
     
  6. AeonX

    AeonX MDL Addicted

    May 24, 2013
    793
    719
    30
    #26 AeonX, Aug 15, 2016
    Last edited by a moderator: Apr 20, 2017
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,220
    84,896
    340
    #27 abbodi1406, Aug 16, 2016
    Last edited by a moderator: Apr 20, 2017
    Why you would need TI rights for dism? it doesn't make a difference and won't allow you to remove inbox packages without modifying registry first
    Code:
    NSudo -u:t -p:e "cmd /k dism /online /?"
    NSudo -u:t -p:e "cmd /c del /f /q C:\Windows\WinSxS\Temp\PendingDeletes\*"
    NSudo -u:t -p:e "del /f /q \"C:\Windows\WinSxS\Temp\PendingDeletes\*\""
    
    anyway, it's better to use .cmd or .bat to execute command lines
    Code:
    NSudo -U:T -P:E "\"\"%~dp0Next.bat"
     
  8. dobbelina

    dobbelina MDL Senior Member

    Apr 2, 2009
    426
    526
    10
    Running the /o switch alone will delete all subkeys.
    Or like when you want to make a list:install_wim_tweak.exe /o /l
    Only when using /c switch pointing to a specific package, will it delete only that subkey.
    Using /h switch to "restore" only sets visibilty back to invinsible, subkeys do not get restored.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. WildByDesign

    WildByDesign MDL Addicted

    Sep 8, 2013
    752
    407
    30
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. AeonX

    AeonX MDL Addicted

    May 24, 2013
    793
    719
    30
    Only side effect I noticed using install_wim_tweak.exe was that after removing the package with the Dism entries in the registry are not removed, but using the MSMG Toolkit they are.

    I used install_wim_tweak.exe to list the packages after the Toolkit and removed packages do not appear.
    But if I use the wim tweak to show the package and remove then with the Dism (Example: Adobe Flash) package appears in the list and also in the registry (HKLM:\Software\Microsoft\windows\CurrentVersion\Component Based Servicing\Packages)

    MSMG uses SetACL for taking ownership of registry keys and uses Dism to remove the packages.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. dobbelina

    dobbelina MDL Senior Member

    Apr 2, 2009
    426
    526
    10
    install_wim_tweak.exe is buggy.
    It claims to have removed packages that still are present.
    Make sure you have disabled Windows Update & System Restore when using these tools!
    Especially when install_wim_tweak.exe starts to give those "joy spreaders" you're playing with fire :evil2:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. slayer9450

    slayer9450 MDL Member

    Aug 3, 2015
    211
    87
    10
    #32 slayer9450, Aug 16, 2016
    Last edited by a moderator: Apr 20, 2017
    I don't need TI rights for dism. It was just the first application I thought of to see if NSudo plays well with command line parameters. As for inbox packages, are you saying I need to do delete the contents of the PendingDeletes folder from my image before I commit it?

    So what you're saying is put all the commands one wants to in a .cmd or .bat then use NSudo to run that file with TI rights?
     
  13. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,220
    84,896
    340
    The commands are just examples on how to use parameters with nsudo
    -
    yes
     
  14. AeonX

    AeonX MDL Addicted

    May 24, 2013
    793
    719
    30
    I use install_wim_tweak.exe just to show the packages, and remove using the Dism.
    And only remove packages offline (on a mounted install.wim). But I am studying other alternatives.
    Thanks for the tips and the guide.

    The install_wim_tweak.exe does not add write permissions to the package registry keys, so I think that's why the Dism can not remove the keys.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. RanCorX2

    RanCorX2 MDL Addicted

    Jul 19, 2009
    999
    554
    30
    #35 RanCorX2, Aug 17, 2016
    Last edited: Aug 17, 2016
    how do you uninstall just using cbsenum? i.e. get past the error code 5.

    nvm, website has instructions, i don't want to use powershell.
     
  16. slayer9450

    slayer9450 MDL Member

    Aug 3, 2015
    211
    87
    10
    #36 slayer9450, Aug 18, 2016
    Last edited: Aug 18, 2016
    Why should one not use the uninstall option in CBSEnum? Tried using it today in a VM to remove the Flash Player components, and not only is the option functional, all it seemed to do was call Dism to remove the package which was reported to be removed successfully.

    I did run it with NSudo though so maybe that had something to do with it.
     
  17. dobbelina

    dobbelina MDL Senior Member

    Apr 2, 2009
    426
    526
    10
    #37 dobbelina, Aug 18, 2016
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Nice!
    Didn't know that worked, I guess firing it up with this command line
    would do the trick then:NSudo -U:T -P:E "CBSEnum_x64.exe" assuming it's in the same folder.
    Haven't tried it as i'm on another project as of now. :D

    Or better in a batch file:
    Code:
    @echo off
    cd /d "%~dp0"
    NSudo -U:T -P:E "CBSEnum_x64.exe"
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. Rudi1

    Rudi1 MDL Member

    May 30, 2007
    208
    67
    10
    #38 Rudi1, Aug 18, 2016
    Last edited: Aug 18, 2016
    Agree,this procedure work for me too.:clap:
    All option in CBSEnum works for me so far.
    Also, I run uninstall by list command and I can remove several package.
    I hope that author can add offline remove option to the program :)
     
  19. dobbelina

    dobbelina MDL Senior Member

    Apr 2, 2009
    426
    526
    10
    First thread has been updated with the NSudo.exe replacing RunAsTI.exe as this makes CBSEnum.exe work
    flawlessly :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. dobbelina

    dobbelina MDL Senior Member

    Apr 2, 2009
    426
    526
    10
    #40 dobbelina, Aug 21, 2016
    Last edited: Aug 21, 2016
    (OP)
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...