diff --git a/cleanW10.ps1 b/cleanW10.ps1 index 35faef9..715cc6c 100755 --- a/cleanW10.ps1 +++ b/cleanW10.ps1 @@ -460,6 +460,7 @@ function DelFile { write-Host -ForegroundColor DarkRed $Error[0].Exception.Message } } + function ExecCommand { param ( [cmdletbinding( @@ -470,22 +471,19 @@ function ExecCommand { ParameterSetName="params", Position = 0 )] - [object]$params + [object]$params ) - $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 -NoNewline "`tExecute : $($params.path) : " + if ( -not (Test-Path $params.path) ) { Write-Host -ForegroundColor Yellow "File not found" return } try { - Start-Process -wait -filepath $path -ArgumentList $args.split(" ") + Start-Process $params.path -ArgumentList $params.arguments Write-Host -ForegroundColor Green "done" } catch { - Write-Host -NoNewLine -ForegroundColor Red "Error`n`t" + Write-Host -NoNewLine -ForegroundColor Red "`Error in DelFile`n`t" write-Host -ForegroundColor DarkRed $Error[0].Exception.Message } } diff --git a/modules.d/GPO_BackgoundApps.conf b/modules.d/GPO_BackgoundApps.conf index 7ecc90d..76183c9 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" : "LetAppsRunInBackground", + "key" : "LetAppsRunInBackgound", "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" : "LetAppsRunInBackground_UserInControlOfTheseApps", + "key" : "LetAppsRunInBackgound_UserInControlOfTheseApps", "type" : "MultiString" }, { "action" : "AddRegKey", "path" : "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\AppPrivacy", - "key" : "LetAppsRunInBackground_ForceAllowTheseApps", + "key" : "LetAppsRunInBackgound_ForceAllowTheseApps", "type" : "MultiString" }, { "action" : "AddRegKey", "path" : "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\AppPrivacy", - "key" : "LetAppsRunInBackground_ForceDenyTheseApps", + "key" : "LetAppsRunInBackgound_ForceDenyTheseApps", "type" : "MultiString" } ] diff --git a/modules.d/GPO_CallHistory.conf b/modules.d/GPO_CallHistory.conf index a4bca9d..bb41fe1 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" : "2" + "value" : "0" }, { "_comment" : "The 3 bottom k eys seems to be some kind of ACL for App right", diff --git a/modules.d/GPO_Email.conf b/modules.d/GPO_Email.conf index 59d81a4..a17dce0 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" : "2" + "value" : "0" }, { "_comment" : "The 3 bottom k eys s eems to be some kind of ACL for App right", diff --git a/modules.d/UninstallModernApp.conf b/modules.d/UninstallModernApp.conf deleted file mode 100644 index ba44bc0..0000000 --- a/modules.d/UninstallModernApp.conf +++ /dev/null @@ -1,53 +0,0 @@ -{ - "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 deleted file mode 100644 index 145be5a..0000000 --- a/modules.d/UninstallModernApp/MicrosoftApps.txt +++ /dev/null @@ -1,39 +0,0 @@ -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 deleted file mode 100644 index 0b702c4..0000000 --- a/modules.d/UninstallModernApp/OthersApps.txt +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index ed5c7a9..0000000 --- a/modules.d/UninstallModernApp/XboxApps.txt +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 8a7a7ae..0000000 --- a/modules.d/UninstallModernApp/XboxServices.txt +++ /dev/null @@ -1,4 +0,0 @@ -XblAuthManager -XblGameSave -XboxNetApiSvc -XboxGipSvc