Page 1 of 1

[RESOLVED] Proposal for a new uninstallation package for Windows 10 Appx

Published: October 14, 2019 - 1:32 PM
by jeancharles
Good morning,

I'm currently deploying Windows 10 1903 and, like many others, I want to remove unnecessary applications. I wanted to suggest adding this script to your repository or the fourmisduweb repository:

Code: Select all

https://github.com/SCConfigMgr/ConfigMgr/blob/master/Operating%20System%20Deployment/Invoke-RemoveBuiltinApps.ps1
This script will allow you to clean up "non-essential" applications from Windows 10.
This configuration setting can also be used to disable the "consumer" view with Candy Crush

Code: Select all

https://www.windowsmanagementexperts.com/disabling-windows-10-consumer-experience/disabling-windows-10-consumer-experience.htm
What do you think of the validity of this idea, and if not here, where should this message be placed?

Thank you and have a good day :) ,

Re: New package proposal

Published: October 14, 2019 - 2:07 PM
by Mathieu
I don't remember if it's available at TIS, but this one works perfectly:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *
import subprocess
import json

uninstallkey = []

apps = [
    ## default Windows 10 apps
    'Microsoft.3DBuilder',
    'Microsoft.Print3D',
    'Microsoft.Microsoft3DViewer',
    'Microsoft.MixedReality.Portal',
    'Microsoft.YourPhone',
    'Microsoft.WindowsFeedbackHub',
    #'Microsoft.Appconnector',
    'Microsoft.BingFinance',
    'Microsoft.BingNews',
    'Microsoft.BingSports',
    'Microsoft.BingWeather',
    #'Microsoft.FreshPaint',
    'Microsoft.Getstarted',
    'Microsoft.MicrosoftOfficeHub',
    'Microsoft.MicrosoftSolitaireCollection',
    #'Microsoft.MicrosoftStickyNotes',
    #'Microsoft.Office.OneNote',
    'Microsoft.OneConnect',
    'Microsoft.People',
    'Microsoft.SkypeApp',
    #'Microsoft.Windows.Photos',
    'Microsoft.WindowsAlarms',
    #'Microsoft.WindowsCalculator',
    #'Microsoft.WindowsCamera',
    'Microsoft.WindowsMaps',
    'Microsoft.WindowsPhone',
    'Microsoft.WindowsSoundRecorder',
    #'Microsoft.WindowsStore',
    'Microsoft.XboxApp',
    'Microsoft.ZuneMusic',
    'Microsoft.ZuneVideo',
    'microsoft.windowscommunicationsapps',
    'Microsoft.MinecraftUWP',
    'Microsoft.MixedReality.Portal'
    #'Microsoft.ScreenSketch'

    ## Threshold 2 apps
    'Microsoft.CommsPhone',
    #'Microsoft.ConnectivityStore',
    'Microsoft.Messaging',
    #'Microsoft.Office.Sway',


    ##Redstone apps
    'Microsoft.BingFoodAndDrink',
    'Microsoft.BingTravel',
    'Microsoft.BingHealthAndFitness',
    'Microsoft.WindowsReadingList',

    ## non-Microsoft
    '9E2F88E3.Twitter',
    'Flipboard.Flipboard',
    'ShazamEntertainmentLtd.Shazam',
    'king.com.CandyCrushSaga',
    'king.com.CandyCrushSodaSaga',
    'king.com.*',
    'ClearChannelRadioDigital.iHeartRadio',
    '4DF9E0F8.Netflix',
    '6Wunderkinder.Wunderlist',
    'Drawboard.DrawboardPDF',
    '2FE3CB00.PicsArt-PhotoStudio',
    'D52A8D61.FarmVille2CountryEscape',
    'TuneIn.TuneInRadio',
    'TheNewYorkTimes.NYTCrossword',
    'king.com.CandyCrushSag',
    'king.com.CandyCrushSodaSaga',
    '828B5831.HiddenCityMysteryofShadow',
    'Microsoft.Advertising.Xaml',

    ## apps which cannot be removed using Remove-AppxPackage
    #'Microsoft.BioEnrollment',
    #'Microsoft.MicrosoftEdge',
    'Microsoft.Windows.Cortana',
    #'Microsoft.WindowsFeedback',
    'Microsoft.XboxGameCallableUI',
    'Microsoft.XboxIdentityProvider',
    'Windows.ContactSupport',
    ]


def install():
    print(u'Starting the debloating process...')
    removed = []
    for app in apps:
        print(u"Trying to remove %s"%app)
        result = run_powershell("""\
            Get-AppxPackage -Name %s -AllUsers | Remove-AppxPackage""" % app)
        if result:
            removed.append(app)
        print run_powershell("""\
            Get-AppXProvisionedPackage -Online |
            where DisplayName -EQ %s |
            Remove-AppxProvisionedPackage -Online""" % app)
    old_removed = json.loads(WAPT.read_param(control.package,'[]'))
    print(u'Previously removed by wapt :\n%s' % ('\n'.join(old_removed),))



##    old_removed.extend(removed)
##    WAPT.write_param(control.package,old_removed)

    print(u'Remaining metro apps ;) : ')
##    print u'\n'.join(sorted(u'"%(Name)s", # (%(Version)s)",' % app for app in run_powershell('Get-AppxPackage -AllUsers')))

def uninstall():
    old_removed = json.loads(WAPT.read_param(control.package,'[]'))
    print(u'Previously removed by wapt :\n%s' % ('\n'.join(old_removed),))
    for app in old_removed:
        result = run_powershell('Get-AppxPackage -Name %(app)s -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}' % locals())
        print result

Re: New package proposal

Published: October 15, 2019 - 11:10 AM
by Gaetan
Hello,
a suggestion if I may: if the structure allows, set up an MDT with the script.
Combined with WAPT, you practically have an SCCM. ;)

Re: New package proposal

Published: October 15, 2019 - 11:30 AM
by jeancharles
Thanks, that looks pretty good, I'll test it. I liked this script; it was up-to-date for version 1903 with only the applications to keep.

Thanks for MDT too. While browsing the packages, I also saw FOG, which looks good:
https://wiki.fogproject.org/wiki/index. ... =Main_Page.


Otherwise, where can we suggest packages, list tips, or find alternative repositories?

I created a fairly simple Citrix Receiver 4.9.8000 LTSR package, for example:

`install_exe_if_needed("CitrixReceiver-4.9.8000.exe",'/SILENT /includeSSON /AutoUpdateCheck=disabled /EnableCEIP=False',key='CitrixOnlinePluginPackWeb')`.

For my PowerShell script that uninstalls unnecessary applications, here's how to run it as a batch file without modifying the PowerShell policy:
`cd %~dp0
powershell -NoProfile -ExecutionPolicy bypass -command "& '.\Invoke-RemoveBuiltinApps.ps1'"`.


Thank you for this great tool and thank you to the community. :)

Re: New package proposal

Published: Dec 28, 2020 - 5:18 PM
by jlatieule
This script is very nice, but I don't understand one of the lines that uses JSON

Does this update the control file? Or is something else generated?

Mathieu wrote: Oct 14, 2019 - 2:07 PM I don't remember if it's available at TIS, but this one works perfectly:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *
import subprocess
import json

uninstallkey = []

apps = [
    ## default Windows 10 apps
    'Microsoft.3DBuilder',
    'Microsoft.Print3D',
    'Microsoft.Microsoft3DViewer',
    'Microsoft.MixedReality.Portal',
    'Microsoft.YourPhone',
    'Microsoft.WindowsFeedbackHub',
    #'Microsoft.Appconnector',
    'Microsoft.BingFinance',
    'Microsoft.BingNews',
    'Microsoft.BingSports',
    'Microsoft.BingWeather',
    #'Microsoft.FreshPaint',
    'Microsoft.Getstarted',
    'Microsoft.MicrosoftOfficeHub',
    'Microsoft.MicrosoftSolitaireCollection',
    #'Microsoft.MicrosoftStickyNotes',
    #'Microsoft.Office.OneNote',
    'Microsoft.OneConnect',
    'Microsoft.People',
    'Microsoft.SkypeApp',
    #'Microsoft.Windows.Photos',
    'Microsoft.WindowsAlarms',
    #'Microsoft.WindowsCalculator',
    #'Microsoft.WindowsCamera',
    'Microsoft.WindowsMaps',
    'Microsoft.WindowsPhone',
    'Microsoft.WindowsSoundRecorder',
    #'Microsoft.WindowsStore',
    'Microsoft.XboxApp',
    'Microsoft.ZuneMusic',
    'Microsoft.ZuneVideo',
    'microsoft.windowscommunicationsapps',
    'Microsoft.MinecraftUWP',
    'Microsoft.MixedReality.Portal'
    #'Microsoft.ScreenSketch'

    ## Threshold 2 apps
    'Microsoft.CommsPhone',
    #'Microsoft.ConnectivityStore',
    'Microsoft.Messaging',
    #'Microsoft.Office.Sway',


    ##Redstone apps
    'Microsoft.BingFoodAndDrink',
    'Microsoft.BingTravel',
    'Microsoft.BingHealthAndFitness',
    'Microsoft.WindowsReadingList',

    ## non-Microsoft
    '9E2F88E3.Twitter',
    'Flipboard.Flipboard',
    'ShazamEntertainmentLtd.Shazam',
    'king.com.CandyCrushSaga',
    'king.com.CandyCrushSodaSaga',
    'king.com.*',
    'ClearChannelRadioDigital.iHeartRadio',
    '4DF9E0F8.Netflix',
    '6Wunderkinder.Wunderlist',
    'Drawboard.DrawboardPDF',
    '2FE3CB00.PicsArt-PhotoStudio',
    'D52A8D61.FarmVille2CountryEscape',
    'TuneIn.TuneInRadio',
    'TheNewYorkTimes.NYTCrossword',
    'king.com.CandyCrushSag',
    'king.com.CandyCrushSodaSaga',
    '828B5831.HiddenCityMysteryofShadow',
    'Microsoft.Advertising.Xaml',

    ## apps which cannot be removed using Remove-AppxPackage
    #'Microsoft.BioEnrollment',
    #'Microsoft.MicrosoftEdge',
    'Microsoft.Windows.Cortana',
    #'Microsoft.WindowsFeedback',
    'Microsoft.XboxGameCallableUI',
    'Microsoft.XboxIdentityProvider',
    'Windows.ContactSupport',
    ]


def install():
    print(u'Starting the debloating process...')
    removed = []
    for app in apps:
        print(u"Trying to remove %s"%app)
        result = run_powershell("""\
            Get-AppxPackage -Name %s -AllUsers | Remove-AppxPackage""" % app)
        if result:
            removed.append(app)
        print run_powershell("""\
            Get-AppXProvisionedPackage -Online |
            where DisplayName -EQ %s |
            Remove-AppxProvisionedPackage -Online""" % app)
    old_removed = json.loads(WAPT.read_param(control.package,'[]'))
    print(u'Previously removed by wapt :\n%s' % ('\n'.join(old_removed),))



##    old_removed.extend(removed)
##    WAPT.write_param(control.package,old_removed)

    print(u'Remaining metro apps ;) : ')
##    print u'\n'.join(sorted(u'"%(Name)s", # (%(Version)s)",' % app for app in run_powershell('Get-AppxPackage -AllUsers')))

def uninstall():
    old_removed = json.loads(WAPT.read_param(control.package,'[]'))
    print(u'Previously removed by wapt :\n%s' % ('\n'.join(old_removed),))
    for app in old_removed:
        result = run_powershell('Get-AppxPackage -Name %(app)s -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}' % locals())
        print result

Re: [SOLVED] Proposal for a new package to uninstall Windows 10 Appx

Published: January 4, 2021 - 11:19 AM
by jpele
Hello everyone,

The package in question is already available on the Store:

https://store.wapt.fr/store/tis-remove-windows-appx

Feel free to suggest improvements.

Sincerely,
Jimmy