Jump to content

How to get rid of Candy Crush Soda Saga and other Windows 10 Start Menu junk for good!


Recommended Posts

Posted

It's really annoying as like you say how many schools will use this approach they mention. Surely 90% of schools have some sort of AD and therefore won't be able to use this School PC app.

 

By the looks of it the new update isn't going to speed up logins so I might have to look at the mandatory profile route.

Posted
I have a windows 10 education wim already created by MDT which we have been deploying and testing. Has anyone put this remove app powershell script in to a deployment task sequence if so how? Or does it ideally need to be done on the capture side? Or can I mount my wim in dism and run the script in dism? I ideally don't want to go back to the start.
Posted
you cant remove apps on a captured wim file it just fails (or at least every time ive tried) you cant remove apps between deploying to a build pc and capturing or sysprep will fail. You either need to remove them before you do your initial deploy to a build pc or as a script upon deployment to actual client pcs i prefer the former but i also dont make customisations to the standard wim file bar removing xbox etc
Posted
I have a windows 10 education wim already created by MDT which we have been deploying and testing. Has anyone put this remove app powershell script in to a deployment task sequence if so how? Or does it ideally need to be done on the capture side? Or can I mount my wim in dism and run the script in dism? I ideally don't want to go back to the start.

 

You can remove them as part of your deploy TS. That's how I've been doing it and it does work.

 

I used this here

 

https://blogs.technet.microsoft.com/mniehaus/2015/11/11/removing-windows-10-in-box-apps-during-a-task-sequence/

Posted
As long as you don't want the machines joined to a domain....

 

From the page you linked:

 

 

 

And are happy with their new list of compulsory Apps on the start screen....

 

 

(This from the link at the bottom of the page previously linked to).

 

 

 

MS need to help us do our job, not assume they can do it better. The system described above must have taken quite a lot of effort to sort out, but the use cases are very limited.

 

I think it seems to be aimed at the low-end Cloudbook stuff they're trying to sell to compete with Chromebooks, putting that kind of hardware on a domain will be a pretty painful user experience (and deployment through lack of RJ45 port etc.) My thought is to chuck these kind of low-end devices in their own VLAN and deploy them as web-first devices in Azure AD and leave them to it.

 

Legacy apps etc. will be a bit more challenging but there's ways around those too.

 

That said compared to a Chromebook it's still a Windows OS that still has fairly hefty updates compared to the Google method and needs AV etc. to stay secure so Chromebook still has the edge technically. The decision then comes down to which ecosystem the organisation has adopted; in our case it's Office 365 but I do like the ChromeOS model over Windows 10 on the low-end kit... hmm decisions

Posted
I added this to our deployTS and it works, thanks for this. I have also enabled app locker to lock out some of the apps that it doesn't remove so all is good.
  • 4 months later...
Posted
I kinda regret doing it as i stupidly removed calculator and photoviewer by using that script which I didn't pick up on in my testing as I forgot about them. However since testing the 1607 build it has bought all those apps back and I just have an app locker policy instead to control access to those apps. I have since removed the script from the TS in MDT
Posted
I kinda regret doing it as i stupidly removed calculator and photoviewer by using that script which I didn't pick up on in my testing as I forgot about them. However since testing the 1607 build it has bought all those apps back and I just have an app locker policy instead to control access to those apps. I have since removed the script from the TS in MDT

 

So you leave all the apps showing on your start menu but just prevent them from running??

Posted
I have created a PowerShell script you might find useful. It's based on the script I linked to above, but I have modified it to work with an offline Windows image (i.e. the install.wim from a Windows 10 ISO).

 

All you need to do is to save it in the same folder as an install.wim, add or remove any apps you want to keep from the section highlighted in red (use the DisplayName, not the PackageName) and then run the script from an elevated PowerShell prompt.

 

What you should end up with is a Windows image that only contains the apps you want. I have tested it with several of the Anniversary Update builds and it works perfectly with those too. :)

 

lRrWhKkM

 

#Requires –Version 5.0
#Requires -RunAsAdministrator
#Requires –Modules Dism

# Get script directory
if ($myInvocation.MyCommand.CommandType -ne [system.Management.Automation.CommandTypes]::Script) {
$ScriptDir = [system.IO.Path]::GetDirectoryName($myInvocation.MyCommand.Definition)
} else {
$ScriptDir = [system.IO.Path]::GetDirectoryName($psISE.CurrentFile.FullPath)
}
Set-Location "$ScriptDir"

# Create mount folder if it doesn't exist
if (!(Test-Path -path "$ScriptDir\Mount")) {
New-Item "$ScriptDir\Mount" -Type Directory -Force | Out-Null
}

Get-WindowsImage -ImagePath "$ScriptDir\install.wim" -ErrorAction Stop | ForEach-Object {

   # Mount image(s)
   "{0} {1} {2}" -f "Mounting image", $($_.ImageIndex), "`n"
   Mount-WindowsImage -Path "$ScriptDir\Mount" -ErrorAction Stop -Index $_.ImageIndex -ImagePath $_.ImagePath | Out-Null

   # Get a list of all apps
   $AppArrayList = Get-AppxProvisionedPackage -Path "$ScriptDir\Mount" | Select-Object -Property DisplayName,PackageName | Sort-Object -Property DisplayName

   # Loop through the list of apps
   ForEach ($App in $AppArrayList) {

       # Exclude essential Windows apps
       if (($App.DisplayName -in "[color="#FF0000"]Microsoft.WindowsCalculator[/color]","[color="#FF0000"]Microsoft.WindowsStore[/color]","[color="#FF0000"]Microsoft.Appconnector[/color]","[color="#FF0000"]Microsoft.WindowsSoundRecorder[/color]")) {
           Write-Output -InputObject "Skipping: $($App.DisplayName)"
       }
       # Remove everything else
       else {
           $AppProvisioningPackageName = Get-AppxProvisionedPackage -Path "$ScriptDir\Mount" | Where-Object { $_.DisplayName -like $App.DisplayName } | Select-Object -ExpandProperty PackageName

           # Attempt to remove AppxProvisioningPackage
           try {
               Write-Output -InputObject "Removing: $AppProvisioningPackageName"
               Remove-AppxProvisionedPackage -PackageName $AppProvisioningPackageName -Path "$ScriptDir\Mount" -ErrorAction Stop | Out-Null
           }
           catch [system.Exception] {
               Write-Warning -Message $_.Exception.Message
           }
       } # Else
   } # ForEach

[color="#4B0082"]    #region Customise Default User Profile
   Write-Output -InputObject "`nCustomising the default user profile"
   REG LOAD "HKLM\_USER" "$ScriptDir\Mount\Users\Default\NTUSER.DAT" | Out-Null
   REG LOAD "HKLM\_SOFTWARE" "$ScriptDir\Mount\Windows\System32\config\SOFTWARE" | Out-Null

   & REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v LaunchTo /d 1 /t REG_DWORD /f
   & REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\Search" /v BingSearchEnabled /d 0 /t REG_DWORD /f
   & REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\Search" /v SearchboxTaskbarMode /d 1 /t REG_DWORD /f
   & REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v DisableWindowsConsumerFeatures /d 1 /t REG_DWORD /f

   REG UNLOAD "HKLM\_USER" | Out-Null
   REG UNLOAD "HKLM\_SOFTWARE" | Out-Null
   #endregion[/color]

   "{0} {1}" -f "`nUnmounting image", $($_.ImageIndex)
   Get-WindowsImage -Mounted | Dismount-WindowsImage -Save -ErrorAction Stop | Out-Null

} # Get-WindowsImage

 

The section highlighted in purple is optional, although it's probably worth keeping so that the "DisableWindowsConsumerFeatures" registry value mentioned in the very first post is added and to avoid the issue described in post #11. The other three registry values above it can be deleted if they aren't required.

 

Removing the apps offline has several advantages...

 

Your script relies on powershell 5

 

My MDT Server only has v4 - I presume there are no issues in upgrading?

Posted
My MDT Server only has v4 - I presume there are no issues in upgrading?

Which version of Windows is your server running and does it have anything installed that relies on certain versions of the Windows Management Framework e.g. SCCM?

Posted
I have created a PowerShell script you might find useful. It's based on the script I linked to above, but I have modified it to work with an offline Windows image (i.e. the install.wim from a Windows 10 ISO).

 

All you need to do is to save it in the same folder as an install.wim, add or remove any apps you want to keep from the section highlighted in red (use the DisplayName, not the PackageName) and then run the script from an elevated PowerShell prompt.

 

What you should end up with is a Windows image that only contains the apps you want. I have tested it with several of the Anniversary Update builds and it works perfectly with those too. :)

 

 

 

This looks like it will achieve exactly what I want it to, but I'm struggling a bit because I'm a Powershell noob. I can follow what's going on - but don't know enough to amend it.

 

It's erroring out at:

 

ForEach-Object {

 

# Mount image(s)

"{0} {1} {2}" -f "Mounting image", $($_.ImageIndex), "`n"

Mount-WindowsImage -Path "$ScriptDir\Mount" -ErrorAction Stop -Index $_.ImageIndex -ImagePath $_.ImagePath | Out-Null

 

 

[/Quote]

 

 

with the message:

 

ForEach-Object {

+ ~

Missing closing '}' in statement block or type definition.

+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordExceptio

n

+ FullyQualifiedErrorId : MissingEndCurlyBrace

[/Quote]

 

I presume I need to put a "}" in somewhere, but could do with some help please :)

 

What I've done so far:

 

Extracted the install.wim from the sources folder of a Win 10 Edu iso and placed in a directory that I created for testing this. Copied the text from @Arthur's post into a txt file and saved as .ps1 file. Upgraded Powershell to v5.0 on my Server 2012R2 machine. Run the script while logged in as an administrator. I guess I've sorted the permissions and pre-requisites to get the script running, so am in an optimistic mood at the minute.

 

Thanks in advance...

Posted
I presume I need to put a "}" in somewhere, but could do with some help please

Download the attached text file to the same folder as your install.wim, rename the extension to .ps1, edit the list of apps you want to keep on line 31 and then run the script from an elevated PowerShell window. :)

Invoke-RemoveBuiltinApps.txt

Posted
Im using teh script to remove the unwanted apps before i even build my base image do i need to "slipstream" the install wim back into the ISO?
Posted
do i need to "slipstream" the install wim back into the ISO?

Yes. You would need to overwrite the install.wim in the ISO with the modified install.wim (if you install Windows 10 from that ISO?).

  • Thanks 1
Posted
I usually build my base image from the ISO in a VM but im sensing you may do it a different way, can i just deploy the install WIM via MDT/WDS?
Posted
Download the attached text file to the same folder as your install.wim, rename the extension to .ps1, edit the list of apps you want to keep on line 31 and then run the script from an elevated PowerShell window. :)

 

Thanks @Arthur

 

Definitely making progress. It's now complaining about the version of DISM - I put just the install.wim and the script in a folder, so I guess that putting the extracted contents of the whole iso and then putting the script in the sources folder will pick up the correct version. I've run out of time just now, but I'll have another go over the weekend.

Posted
It's now complaining about the version of DISM

I think it might be worth running the script on Windows 10 rather than Server 2012 R2.

  • Thanks 1
Posted

This worked perfectly thank you. I now have a PC with Windows 10 edu without junk installed!

 

Still making basic mistakes somewhere - the ISO I created (well the 4 I've created on various media) aren't bootable, but when I run setup from the mounted ISO on a windows machine, (the customised) Windows installs correctly. The BIOS reports no operating system found :( Need to stop as I'm obviously making the same mistake every time. In the mean time I can play around during out the tile layout and XML.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...