Skip to main content

How to Check if a Windows Store App is Installed in Batch Script

Modern Windows applications (UWP/Appx) like the Calculator, Microsoft Photos, or enterprise apps from the Microsoft Store do not show up in the standard wmic product list. They live in a different area of the operating system called the Appx Store. If your script needs to verify that the "Company Portal" or a specific "Store App" is present before a meeting, you cannot rely on looking for a .exe in Program Files. A Batch script can use a PowerShell bridge to query the Appx database and instantly confirm if a modern app is installed and what version is running.

This guide will explain how to audit Windows Store apps using Batch.

Method: The Appx Package Audit (PowerShell Bridge)

We use the PowerShell Get-AppxPackage cmdlet to find the application by its unique package name.

@echo off
set "AppName=Microsoft.WindowsCalculator"

echo [AUDIT] Searching for Store App: %AppName%...

:: Use PowerShell to check if the package is installed
powershell -NoProfile -Command ^
"$pkg = Get-AppxPackage -Name '%AppName%' -ErrorAction SilentlyContinue;" ^
"if ($pkg) {" ^
" Write-Host '[FOUND] Package:' $pkg.PackageFullName;" ^
" Write-Host 'Version:' $pkg.Version;" ^
" exit 0" ^
"} else {" ^
" Write-Host '[NOT FOUND] %AppName% is not installed for the current user.';" ^
" exit 1" ^
"}"

if %errorlevel% equ 0 (
echo [SUCCESS] The app is installed and registered on this machine.
) else (
echo [ALERT] App NOT FOUND. Check the package name or the Store account.
)

pause

Method 2: Extracting the Version Number

If you need to ensure a user has the latest version of a Store app for security reasons.

@echo off
setlocal

set "Target=Microsoft.WindowsStore"
set "StoreVersion="

echo [ACTION] Retrieving version for %Target%...

:: Extract the version property from the package
for /f "tokens=*" %%v in ('powershell -NoProfile -Command ^
"$pkg = Get-AppxPackage -Name '%Target%' -ErrorAction SilentlyContinue;" ^
"if ($pkg) { $pkg.Version } else { Write-Host 'NOT_INSTALLED' }"') do (
set "StoreVersion=%%v"
)

if "%StoreVersion%"=="NOT_INSTALLED" (
echo [ALERT] %Target% is not installed.
) else if defined StoreVersion (
echo [INFO] %Target% Version: %StoreVersion%
) else (
echo [ERROR] Failed to query package information.
)

pause
endlocal

Method 3: The "All Users" Compliance Check

Use this on a shared computer or server to see if a specific app is provisioned for every user account on the machine.

@echo off
echo [LOG] Auditing application presence across all users...
echo.

:: -AllUsers requires Administrator privileges
powershell -NoProfile -Command ^
"$apps = Get-AppxPackage -AllUsers -ErrorAction SilentlyContinue |" ^
" Where-Object { $_.Name -like '*Microsoft*' } |" ^
" Select-Object Name, Version, @{Name='User';Expression={$_.PackageUserInformation.UserSecurityId.Sid}} |" ^
" Sort-Object Name -Unique;" ^
"if ($apps) { $apps | Format-Table Name, Version -AutoSize }" ^
"else { Write-Host '[INFO] No matching packages found.' }"

echo.
pause

How to Avoid Common Errors

Wrong Way: Searching for the app folder in 'C:\Program Files\WindowsApps'

The WindowsApps folder is protected by extreme system-level permissions (TrustedInstaller). If your script tries to dir that folder, you will get "Access Denied," even as an Administrator.

Correct Way: Always use the Get-AppxPackage command (Method 1). It queries the Windows Database, which doesn't require you to touch the physical protected folders.

Problem: Friendly Name vs Package Name

The app you know as "Calculator" is actually named Microsoft.WindowsCalculator in the system.

Solution: Run powershell -NoProfile -Command "Get-AppxPackage | Select-Object Name" to see the full list of package names for your installed apps.

Best Practices and Rules

1. Identify "PackageFamilyName"

When writing scripts for automation, always use the PackageFamilyName or the exact Name property instead of just a partial name string. This ensures your script doesn't accidentally match two different apps that share a similar word.

2. Run as User

Unlike MSI installers, Store apps are often installed per-user. If you run your script as "Administrator," you might not see the apps installed for the regular "Employee" account. Run your script as the target user for the most accurate results, or use -AllUsers (Method 3) when you need a complete inventory.

3. Log the Inventory

Keep a record of your Store App versions to ensure every workstation has the same tools for collaboration. powershell -NoProfile -Command "Get-AppxPackage | Select-Object Name, Version | Format-Table -AutoSize" >> store_app_audit.log

Conclusions

Checking Windows Store app presence via Batch script is a critical task for maintaining a modern Windows 10 or 11 environment. By moving away from legacy folder-checking and utilizing specialized Appx commands, you gain the visibility needed to manage contemporary software ecosystems. This professional level of auditing ensures that your team always has the tools they need, providing a reliable and standardized foundation for modern business productivity.