You are working with an image right? Just a few hours ago I removed these packages using IWT on Online image: Code: install_wim_tweak.exe /o /c Microsoft-OneCore-AppRuntime-xbox /r install_wim_tweak.exe /o /c Microsoft-Xbox /r install_wim_tweak.exe /o /c Microsoft-OneCore-AppRuntime-WOW64-xbox /r install_wim_tweak.exe /o /c Microsoft-OneCore-Networking-XboxLive /r install_wim_tweak.exe /o /c Microsoft-Windows-Client-Drivers-xbox /r install_wim_tweak.exe /o /c Microsoft-Windows-Client-Features-Package-AutoMerged-xbox /r install_wim_tweak.exe /o /c Microsoft-Windows-Client-Features-WOW64-Package-AutoMerged-xbox /r install_wim_tweak.exe /o /c Microsoft-Windows-OneDrive /r install_wim_tweak.exe /o /c Microsoft-WindowsFeedback /r After a restart Windows configured something and all went well. Just did sfc /scannow (everything OK) and tried changing optional features (enabled/disabled telnet, WMP) - also OK. Maybe it has something to do with offline images? However I do have a question about "Metro" Apps - if I remove them through PS, they get deleted, but return after a restart (except "System" Apps such as Xbox). Is there a way for these not to get reinstalled?
Yes working with mounted images not online. Appx Issus maybe related to -AllUser(s?) switch? Or just Remove them with DISM.
Stupid question (sorry!): What's the difference between these two and is one "better" than the other? Code: PS C:\> DISM /Online /Remove-AppxPackage /PackageName:$Package PS C:\> DISM /Online /Remove-ProvisionedAppxPackage /PackageName:$Package Thanks in advance!
1) Pure PS 2) Pure DISM This is right: Code: PS C:\>Remove-AppxPackage /PackageName:$Package C:\> DISM /Online /Remove-ProvisionedAppxPackage /PackageName:$Package BTW here is my quick and dirty script if anybody is interessted. Code: @echo off & cls call "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\DandISetEnv.bat" setlocal EnableDelayedExpansion set Text=echo. & echo. & echo set Resources=Resources set Tools=%Resources%\_Tools set FoD=%Resources%\FoD set Lists=%Resources%\Lists set PPKGs=%Resources%\ProvisioningPackages set Mount=%Resources%\_Mount set DISMCmd=dism.exe /English /Image:"%Mount%" set OriginalWIM=enterprise10_original.wim set WIMFile=enterprise10.wim set Index=1 set VHD=%SystemDrive%\VHD call :PrepareTasks call :MountImage call :AddPackages call :ConfigFeatures call :RemovePackages call :RemoveAppx call :UnmountImage call :ExportImage call :PostTasks echo Done... pause > nul exit /b :--------------------------------------------------- :Subroutine :--------------------------------------------------- :PrepareTasks echo Prepare Actions......... if exist "%Resources%\%WIMFile%" (del "%Resources%\%WIMFile%") copy "%Resources%\%OriginalWIM%" "%Resources%\%WIMFile%" goto :EOF :MountImage %Text% Mount Image......... dism.exe /English /Mount-Image /ImageFile:"%Resources%\%WIMFile%" /Index:%Index% /MountDir:"%Mount%" goto :EOF :AddPackages %Text% Add Features......... %DISMCmd% /Add-Package /PackagePath:"%FoD%" %DISMCmd% /Add-ProvisioningPackage /PackagePath:"%PPKGs%\DefaultStartMenuLayout.ppkg" %DISMCmd% /Add-ProvisioningPackage /PackagePath:"%PPKGs%\Settings.ppkg" ::%DISMCmd% /Add-ProvisioningPackage /PackagePath:"%PPKGs%\FeaturesOnDemand.ppkg" ::%DISMCmd% /Add-ProvisioningPackage /PackagePath:"%PPKGs%\Z30_Drivers.ppkg" goto :EOF :RemoveAppx %Text% Remove Apps(x)......... for /f "usebackq" %%i in ("%Lists%\_RemoveAppx.txt") do (%DISMCmd% /Remove-ProvisionedAppxPackage /PackageName:%%i) goto :EOF :ConfigFeatures %Text% Config Features......... call :CreateList "FeatureName" "_FeatureDisable.txt" %DISMCmd% /Disable-Feature %Component% call :CreateList "FeatureName" "_FeatureEnable.txt" %DISMCmd% /Enable-Feature %Component% goto :EOF :RemovePackages %Text% Remove Components......... for /f "usebackq" %%i in ("%Lists%\_RemoveComponents.txt") do ("%Tools%\install_wim_tweak.exe" /n /p "%Mount%" /c "%%i") call :CreateList "PackageName" "_RemoveComponents.txt" %DISMCmd% /Remove-Package %Component% goto :EOF :UnmountImage %Text% Unmount Image......... dism.exe /English /Unmount-Image /MountDir:"%Mount%" /Commit /CheckIntegrity goto :EOF :ExportImage %Text% Export Image......... ren "%Resources%\%WIMFile%" "CommitedWIM.wim" dism.exe /English /Export-Image /SourceImageFile:"%Resources%\CommitedWIM.wim" /SourceIndex:%Index% /DestinationImageFile:"%Resources%\%WIMFile%" /CheckIntegrity goto :EOF :PostTasks %Text% Post Install......... del "%Resources%\CommitedWIM.wim" if exist "%VHD%\%WIMFile%" (del "%VHD%\%WIMFile%") move "%Resources%\%WIMFile%" "%VHD%\" goto :EOF echo. & echo All Done... pause > nul exit /b :------------------------------------------------ :Sub-Subroutine :------------------------------------------------ :CreateList set Component= for /f "usebackq" %%i in ("%Lists%\%~2") do set Component=!Component! /%~1:%%i goto :EOF :------------------------------------------------ :OLD - Not Used :------------------------------------------------ set Package= set Temp1= for /f %%i in (%Lists%\%~2) do ( set Temp1=/%~1:%%i set Package=!Package! !Temp1! ) Structure Code: Resources | enterprise10_original.wim | +---FoD | Microsoft-Windows-LanguageFeatures-Fonts-PanEuropeanSupplementalFonts-Package.cab | Microsoft-Windows-NetFx3-OnDemand-Package.cab | +---Lists | _FeatureDisable.txt | _FeatureEnable.txt | _RemoveAppx.txt | _RemoveComponents.txt | +---ProvisioningPackages | DefaultStartMenuLayout.ppkg | FeaturesOnDemand.ppkg | Settings.ppkg | Z30_Drivers.ppkg | +---Updates | | Windows10.0-KB3074678-x64.cab | | Windows10.0-KB3074686-x64.cab | | Windows10.0-KB3081424-x64.cab | | | \---Optional | Windows10.0-KB3081704-x64.cab | +---_Mount \---_Tools install_wim_tweak.exe
I'm using DISM.exe What is the DISM syntax for that above for OFFLINE editing install.wim ? I can't find the packages such as this one : Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~amd64~~10.0.10240.16384 The package that listed using : dism /image:c:\{mount directory} /Get-Packages Is this one (just for package example) : Microsoft-Windows-DiagTrack-Internal-Package~31bf3856ad364e35~x86~~10.0.10240.16384 And this succesfully removed. But how remove the rest in the quote box above using DISM?
Not sure if there is a DISM command to unhide the packages. Use install_wim_tweak.exe /p <MountPath> /l
Ok this works, BUT.... I've still got the search glass on the taskbar (clicking on it does not do anything). And the OneDrive icon still sits in the explorer window. It would be nice to delete both items, it's something cosmetic perhaps. Cheers.
Just hide it right clicking on the taskbar For the icon there are a lot of threads that explain how to delete it. Or, if your user is fresh, just create a new user then delete the old one.
After I remove the packages OFFLINE and then clean install How do I know (how to check) that my machine still contact (connection leak) to MS? I can't figured out TCPView result meaning