ChrisTitusTech / winutil

Chris Titus Tech's Windows Utility - Install Programs, Tweaks, Fixes, and Updates
MIT License
21.96k stars 1.35k forks source link

Bloatware addition #706

Closed Habitant8381 closed 7 months ago

Habitant8381 commented 1 year ago

Is your feature request related to a problem? Please describe. I'd like to add some additional script to the bloatware function but when running the helperscript.ps1 it doesn't seem to play too nicely for me to make a pull request

Describe the solution you'd like Add this additional bit of code

$trialFiles = @(
    'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Adobe Offers.lnk'
    'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Amazon.com.lnk'
    'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\HP Documentation.lnk'
    'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Agoda.lnk'
    'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Forge of Empires.lnk'
    'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Planet9 Link.lnk'
    'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Free Trials.lnk'
    'C:\Program Files (x86)\Online Services\Adobe'
)

$trialFiles.ForEach({
        if (Test-Path -Path $_) {
            Write-Output "Removing $_ ..."
            Remove-Item -Path $_ -Force -Confirm
        }
    })

function New-FolderForced {
    [CmdletBinding(SupportsShouldProcess = $true)]
    param (
        [Parameter(Position = 0, Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [string]
        $Path
    )

    process {
        if (-not (Test-Path $Path)) {
            Write-Verbose "-- Creating full path to:  $Path"
            New-Item -Path $Path -ItemType Directory -Force
        }
    }
}

# Prevents Apps from re-installing
$cdm = @(
    'ContentDeliveryAllowed'
    'FeatureManagementEnabled'
    'OemPreInstalledAppsEnabled'
    'PreInstalledAppsEnabled'
    'PreInstalledAppsEverEnabled'
    'SilentInstalledAppsEnabled'
    'SubscribedContent-314559Enabled'
    'SubscribedContent-338387Enabled'
    'SubscribedContent-338388Enabled'
    'SubscribedContent-338389Enabled'
    'SubscribedContent-338393Enabled'
    'SubscribedContentEnabled'
    'SystemPaneSuggestionsEnabled'
)

New-FolderForced -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager'
foreach ($key in $cdm) {
    Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' $key 0
}

New-FolderForced -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore'
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore' 'AutoDownload' 2

# Prevents "Suggested Applications" returning
New-FolderForced -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent'
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent' 'DisableWindowsConsumerFeatures' 1

Write-Host 'Finished Removing Bloatware Apps'

Describe alternatives you've considered If I add this code in manually into the main winutil.ps1 its removed when the start.ps1 is ran

d0x360 commented 1 year ago

Interesting...I have none of those on 10 or 11 and they are week old installs. I have worse ones that I'd never think of using lol and they came on 11 Pro! I just deleted them like usual and they have never come back on any system I have unless I upgrade from 10 to 11, then they come back until I remove them.

Tldr I've never needed a reg setting to keep them from coming back but understand why you might want one if they do... I wonder why I'm not getting them...

eirnym commented 1 year ago

I agree with @Habitant8381 as "world" selection is not always available for all languages. pl_PL is an example

github-actions[bot] commented 7 months ago

Closed due to inactivity