From 4e2ad141533ad2df77d9438f282735cb7edea7bd Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Mon, 26 Mar 2018 13:02:36 +0200 Subject: [PATCH 1/5] Bad reg values for LetAppsAccessCallHistory --- modules.d/GPO_CallHistory.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules.d/GPO_CallHistory.conf b/modules.d/GPO_CallHistory.conf index bb41fe1..a4bca9d 100644 --- a/modules.d/GPO_CallHistory.conf +++ b/modules.d/GPO_CallHistory.conf @@ -8,7 +8,7 @@ "action" : "AddRegKey", "path" : "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\AppPrivacy", "key" : "LetAppsAccessCallHistory", - "value" : "0" + "value" : "2" }, { "_comment" : "The 3 bottom k eys seems to be some kind of ACL for App right", From b765d3752f616f5b218af9a308ad0e7795a642e2 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Mon, 26 Mar 2018 13:03:12 +0200 Subject: [PATCH 2/5] Bad reg values for LetAppsAccessEmail --- modules.d/GPO_Email.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules.d/GPO_Email.conf b/modules.d/GPO_Email.conf index a17dce0..59d81a4 100644 --- a/modules.d/GPO_Email.conf +++ b/modules.d/GPO_Email.conf @@ -8,7 +8,7 @@ "action" : "AddRegKey", "path" : "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\AppPrivacy", "key" : "LetAppsAccessEmail", - "value" : "0" + "value" : "2" }, { "_comment" : "The 3 bottom k eys s eems to be some kind of ACL for App right", From 1d7d2a62545b2eccccf09772fcbcb446c042ae8c Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Mon, 26 Mar 2018 13:06:00 +0200 Subject: [PATCH 3/5] Bad reg key --- modules.d/GPO_BackgoundApps.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules.d/GPO_BackgoundApps.conf b/modules.d/GPO_BackgoundApps.conf index 76183c9..7ecc90d 100644 --- a/modules.d/GPO_BackgoundApps.conf +++ b/modules.d/GPO_BackgoundApps.conf @@ -7,26 +7,26 @@ "_comment" : "This is the principal reg key controlled by GPO", "action" : "AddRegKey", "path" : "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\AppPrivacy", - "key" : "LetAppsRunInBackgound", + "key" : "LetAppsRunInBackground", "value" : "2" }, { "_comment" : "The 3 bottom k eys seems to be some kind of ACL for App right", "action" : "AddRegKey", "path" : "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\AppPrivacy", - "key" : "LetAppsRunInBackgound_UserInControlOfTheseApps", + "key" : "LetAppsRunInBackground_UserInControlOfTheseApps", "type" : "MultiString" }, { "action" : "AddRegKey", "path" : "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\AppPrivacy", - "key" : "LetAppsRunInBackgound_ForceAllowTheseApps", + "key" : "LetAppsRunInBackground_ForceAllowTheseApps", "type" : "MultiString" }, { "action" : "AddRegKey", "path" : "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\AppPrivacy", - "key" : "LetAppsRunInBackgound_ForceDenyTheseApps", + "key" : "LetAppsRunInBackground_ForceDenyTheseApps", "type" : "MultiString" } ] From f7d0a679acbe214f561df463cc559be242c99daf Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Mon, 26 Mar 2018 22:17:29 +0200 Subject: [PATCH 4/5] Rewrite ExecCommand() --- cleanW10.ps1 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cleanW10.ps1 b/cleanW10.ps1 index 715cc6c..35faef9 100755 --- a/cleanW10.ps1 +++ b/cleanW10.ps1 @@ -460,7 +460,6 @@ function DelFile { write-Host -ForegroundColor DarkRed $Error[0].Exception.Message } } - function ExecCommand { param ( [cmdletbinding( @@ -471,19 +470,22 @@ function ExecCommand { ParameterSetName="params", Position = 0 )] - [object]$params + [object]$params ) - Write-Host -NoNewline "`tExecute : $($params.path) : " - if ( -not (Test-Path $params.path) ) { + $path = $params.path.Replace("##mod_path##", $script:current_module_path) + $args = $params.arguments.Replace("##mod_path##", $script:current_module_path) + Write-Host -NoNewline "`tExecute : $path : " + $path = Invoke-Expression """$($path)""" + if ( -not (Test-Path $path) -and -not $path -eq "powershell" ) { Write-Host -ForegroundColor Yellow "File not found" return } try { - Start-Process $params.path -ArgumentList $params.arguments + Start-Process -wait -filepath $path -ArgumentList $args.split(" ") Write-Host -ForegroundColor Green "done" } catch { - Write-Host -NoNewLine -ForegroundColor Red "`Error in DelFile`n`t" + Write-Host -NoNewLine -ForegroundColor Red "Error`n`t" write-Host -ForegroundColor DarkRed $Error[0].Exception.Message } } From 97ad26ff910a85887ba5a66d5fc8cebd71eaf95b Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Mon, 26 Mar 2018 23:01:13 +0200 Subject: [PATCH 5/5] First version of UninstallModernApp module --- modules.d/UninstallModernApp.conf | 53 +++++++++++++++++++ .../UninstallModernApp/MicrosoftApps.txt | 39 ++++++++++++++ modules.d/UninstallModernApp/OthersApps.txt | 10 ++++ modules.d/UninstallModernApp/XboxApps.txt | 5 ++ modules.d/UninstallModernApp/XboxServices.txt | 4 ++ 5 files changed, 111 insertions(+) create mode 100644 modules.d/UninstallModernApp.conf create mode 100644 modules.d/UninstallModernApp/MicrosoftApps.txt create mode 100644 modules.d/UninstallModernApp/OthersApps.txt create mode 100644 modules.d/UninstallModernApp/XboxApps.txt create mode 100644 modules.d/UninstallModernApp/XboxServices.txt diff --git a/modules.d/UninstallModernApp.conf b/modules.d/UninstallModernApp.conf new file mode 100644 index 0000000..ba44bc0 --- /dev/null +++ b/modules.d/UninstallModernApp.conf @@ -0,0 +1,53 @@ +{ + "name" : "Uninstall Modern Apps", + "description" : "Uninstall unwanted Modern App", + "actions" : + [ + { + "_comment" : "Disable MapsBoker service for uninstall Windows Map", + "action" : "DisableService", + "name" : "MapsBroker" + }, + { + "_comment" : "Uninstall Windows Maps", + "action" : "UninstallModernApp", + "name" : "Microsoft.WindowsMaps", + "removeProvisonned" : "True" + }, + { + "_comment" : "Disable xbox services for uninstall Apps", + "action" : "DisableService", + "file" : "XboxServices.txt" + }, + { + "_comment" : "Disable Xbox sheduled tasks", + "action" : "RemoveSheduledTask", + "path" : "Microsoft\\XblGameSave\\", + "name" : "XblGameSaveTask" + }, + { + "_comment" : "Disable Xbox sheduled tasks", + "action" : "RemoveSheduledTask", + "path" : "Microsoft\\XblGameSave\\", + "name" : "XblGameSaveTaskLogon" + }, + { + "_comment" : "Uninstall Xbox Apps", + "action" : "UninstallModernApp", + "file" : "XboxApps.txt", + "removeProvisonned" : "True" + }, + { + "_comment" : "Uninstall Microsoft Apps", + "action" : "UninstallModernApp", + "file" : "MicrosoftApps.txt", + "removeProvisionned" : "True" + }, + { + "_comment" : "Uninstall third party apps", + "action" : "UninstallModernApp", + "file" : "OthersApps.txt", + "removeProvisionned" : "True" + } + ] +} diff --git a/modules.d/UninstallModernApp/MicrosoftApps.txt b/modules.d/UninstallModernApp/MicrosoftApps.txt new file mode 100644 index 0000000..145be5a --- /dev/null +++ b/modules.d/UninstallModernApp/MicrosoftApps.txt @@ -0,0 +1,39 @@ +Microsoft.3dbuilder +Microsoft.Appconnector +Microsoft.BingFinance +Microsoft.BingFoodAndDrink +Microsoft.BingHealthAndFitness +Microsoft.BingNews +Microsoft.BingSports +Microsoft.BingTravel +Microsoft.BingWeather +Microsoft.CommsPhone +Microsoft.ConnectivityStore +Microsoft.Getstarted +Microsoft.Messaging +Microsoft.Microsoft3DViewer +Microsoft.MicrosoftOfficeHub +Microsoft.MicrosoftPowerBIForWindows +Microsoft.MicrosoftSolitaireCollection +Microsoft.MicrosoftStickyNotes +Microsoft.MinecraftUWP +Microsoft.MSPaint +Microsoft.Office.OneNote +Microsoft.Office.Sway +Microsoft.OneConnect +Microsoft.People +Microsoft.Services.Store.Engagement +Microsoft.SkypeApp +Microsoft.Windows.Photos +Microsoft.WindowsAlarms +Microsoft.WindowsCalculator +Microsoft.WindowsCamera +microsoft.windowscommunicationsapps +Microsoft.WindowsFeedbackHub +Microsoft.WindowsMaps +Microsoft.WindowsPhone +Microsoft.WindowsSoundRecorder +Microsoft.WindowsStore +Microsoft.ZuneMusic +Microsoft.ZuneVideo +Microsoft.Advertising.Xaml diff --git a/modules.d/UninstallModernApp/OthersApps.txt b/modules.d/UninstallModernApp/OthersApps.txt new file mode 100644 index 0000000..0b702c4 --- /dev/null +++ b/modules.d/UninstallModernApp/OthersApps.txt @@ -0,0 +1,10 @@ +DolbyLaboratories.DolbyAccess +Expedia.ExpediaHotelsFlightsCarsActivities +2414FC7A.Viber +64885BlueEdge.OneCalendar +89006A2E.AutodeskSketchBook +9E2F88E3.Twitter +CAF9E577.Plex +king.com.CandyCrushSodaSaga +SpotifyAB.SpotifyMusic +WinZipComputing.WinZipUniversal diff --git a/modules.d/UninstallModernApp/XboxApps.txt b/modules.d/UninstallModernApp/XboxApps.txt new file mode 100644 index 0000000..ed5c7a9 --- /dev/null +++ b/modules.d/UninstallModernApp/XboxApps.txt @@ -0,0 +1,5 @@ +Microsoft.Xbox.TCUI +Microsoft.XboxApp +Microsoft.XboxGameOverlay +Microsoft.XboxIdentityProvider +Microsoft.XboxSpeechToTextOverlay diff --git a/modules.d/UninstallModernApp/XboxServices.txt b/modules.d/UninstallModernApp/XboxServices.txt new file mode 100644 index 0000000..8a7a7ae --- /dev/null +++ b/modules.d/UninstallModernApp/XboxServices.txt @@ -0,0 +1,4 @@ +XblAuthManager +XblGameSave +XboxNetApiSvc +XboxGipSvc