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.
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.
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.
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"
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.
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.
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
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?
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.
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.
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.
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. Or better in a batch file: Code: @echo off cd /d "%~dp0" NSudo -U:T -P:E "CBSEnum_x64.exe"
Agree,this procedure work for me too. 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
First thread has been updated with the NSudo.exe replacing RunAsTI.exe as this makes CBSEnum.exe work flawlessly