Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Default Windows apps have a much larger size than reported
#1
Information 
Quote:Microsoft's Windows 11 operating system includes dozens of default applications that are available by default right after installation on first run. Some of these applications provide core functionality, like photo viewing, media playing or plain text editing. Others have a narrow focus that is of use to a small subset of Windows users only.

[Image: windows-11-actual-app-storage-space.png]

Many of the preinstalled apps can be removed from the Windows machine, either through Settings > Apps, PowerShell commands, or by using a program like winget, the Windows Packet Manager. The apps occupy disk space and some administrators may want to remove them to free up space on a drive.

When it comes to determining the actual size these apps occupy, administrators will run into roadblocks. The Settings > Apps listing is useless for this, as many of the default Windows apps are listed with a few Kilobytes of size only.

[Image: windows-11-app-sizes.png]

The storage readings are not correct. The reason for the low number that is reported for preinstalled Windows apps is that these applications may be installed into multiple folders. Microsoft's Settings application returns the size of one of the folders as it ignores any other folder that stores application files.

The same is true when you run regular PowerShell commands to return application listings.

Michael Niehaus analyzed the behavior on Windows 11. He published his findings in a blog post on his website and created a PowerShell script that returns the full size of default applications on Windows systems.

The PowerShell script is available as a download. Just download the zip archive to the local system and extract it to get started.

Use the Start Menu to launch an elevated PowerShell prompt, navigate to the folder the script is stored in, and run .\Get-AppSizes.ps1 -online | Out-GridView to get the output.

Note that you need to allow the execution of third-party scripts and select "run once" when prompted to run it. Cautious users may look at the code before they run the script to make sure it is safe to run.
 
Code:
Get-AppxProvisionedPackage -online | % {
# Get the main app package location using the manifest
$loc = Split-Path ( [Environment]::ExpandEnvironmentVariables($_.InstallLocation) ) -Parent
If ((Split-Path $loc -Leaf) -ieq 'AppxMetadata') {
$loc = Split-Path $loc -Parent
}
# Get a pattern for finding related folders
$matching = Join-Path -Path (Split-Path $loc -Parent) -ChildPath "$($_.DisplayName)*"
$size = (Get-ChildItem $matching -Recurse -ErrorAction Ignore | Measure-Object -Property Length -Sum).Sum
# Add the results to the output
$_ | Add-Member -NotePropertyName Size -NotePropertyValue $size
$_ | Add-Member -NotePropertyName InstallFolder -NotePropertyValue $loc
$_
} | Select DisplayName, PackageName, Version, InstallFolder, Size

The PowerShell script opens a new window, that lists each application in its own row. Each app is listed with its name, package name, install folder, version and size. The size is listed in bytes. Most apps have a size of ten Megabytes and more. Some, YourPhone, Windows Store, Windows Communication Apps, or Microsoft Teams, are much larger than that.

Closing Words

Microsoft should readjust the size readings in the Apps listing of the Settings application, as the small sizes of the installed apps give users and administrators an incorrect impression.

Now You: do you remove preinstalled apps on your machines?
...
Continue Reading
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)
[-]
Welcome
You have to register before you can post on our site.

Username/Email:


Password:





[-]
Recent Posts
AdGuard for Mac 2.14
AdGuard for Mac 2....harlan4096 — 09:03
AdGuard VPN for Mac 2.3
AdGuard VPN for Ma...harlan4096 — 08:58
INTEL Arc Graphics 31.0.101.5444
INTEL Arc Graphics...harlan4096 — 08:56
AMD “Strix Halo” Zen5 & RDNA3.5 premium ...
AMD first ultra-hi...harlan4096 — 08:54
Malwarebytes 5.1.3.110
Malwarebytes 5.1.3...Mohammad.Poorya — 00:51

[-]
Birthdays
Today's Birthdays
avatar (42)techlignub
avatar (41)Stevenmam
avatar (48)onlinbah
Upcoming Birthdays
avatar (43)wapedDow
avatar (49)steakelask
avatar (43)Termoplenka
avatar (41)bycoPaist
avatar (47)pieloKat
avatar (41)ilyagNeexy
avatar (49)donitascene
avatar (49)Toligo

[-]
Online Staff
There are no staff members currently online.

>