Skip to main content

Command Syntax

BCU-console uses the following general syntax:
BCU-console <command> [arguments] [switches]
All switches are case-insensitive and can be specified in any order.

help - Display Help

Show the help screen with all available commands and switches.

Syntax

BCU-console help
BCU-console /?

Example Output

BCU-console [help | /?] - Show help (this screen)

BCU-console uninstall [drive:][path]filename [/Q] [/U] [/V] [/J=<Level>] - Uninstall applications.
BCU-console export [drive:][path]filename [/Q] [/U] [/V] - Export installed application data to xml file.
BCU-console list [/Q] [/U] [/V] - Display a list of installed applications.

Switches:
 /Q             - Use quiet uninstallers wherever possible
 /U             - Unattended mode (do not ask user for confirmation)
 /J=<Level>     - Attempt to clean up leftover "junk" after uninstall
 /V             - Verbose logging mode

Return codes:
 0      - The operation completed successfully.
 1      - Invalid arguments.
 1223   - The operation was canceled by the user.

uninstall

Uninstall one or more applications using a .bcul uninstall list file.

Syntax

BCU-console uninstall [drive:][path]filename [/Q] [/U] [/V] [/J=<Level>]

Parameters

ParameterRequiredDescription
[drive:][path]filenameYesPath to the .bcul uninstall list file that specifies which applications to uninstall

Switches

SwitchDescriptionDefault
/QUse quiet (silent) uninstallers wherever possibleOff (use loud uninstallers)
/UUnattended mode - do not ask user for confirmationOff (prompt for confirmation)
/VVerbose logging mode - show detailed informationOff (normal output)
/J or /J=<Level>Clean up leftover junk after uninstall. If no level specified, defaults to VeryGoodOff (no junk cleanup)

Junk Cleanup Levels

The /J switch accepts the following confidence levels:
Moderate risk - Removes items with good confidence. May include some files that could potentially be shared with other applications.
BCU-console uninstall C:\Lists\apps.bcul /J=Good
High risk - Removes items that might still be in use by other applications. Use with extreme caution.
BCU-console uninstall C:\Lists\apps.bcul /J=Questionable
Very high risk - May remove important data. Only use if you fully understand the consequences.
BCU-console uninstall C:\Lists\apps.bcul /J=Bad
Extreme risk - Not recommended. May cause system instability or data loss.
BCU-console uninstall C:\Lists\apps.bcul /J=Unknown

Examples

# User will be prompted to confirm before uninstalling
BCU-console uninstall C:\Lists\bloatware.bcul

Example Output

BCU-console, Version=5.x.x.x, Culture=neutral, PublicKeyToken=null

Starting bulk uninstall...
Looking for applications...
Found 247 applications.
3 application(s) were matched by the list: Adobe Flash Player; Java 8 Update 291; WinRAR 6.02
These applications will now be uninstalled PERMANENTLY.
Do you want to continue? [Y]es/[N]o

Setting-up for the uninstall task...
Running: 1, Waiting: 2, Finished: 0, Failed: 0
Running: 1, Waiting: 1, Finished: 1, Failed: 0
Running: 1, Waiting: 0, Finished: 2, Failed: 0
Running: 0, Waiting: 0, Finished: 3, Failed: 0
Uninstall task Finished.

Return Codes

CodeMeaningWhen It Occurs
0SuccessAll applications uninstalled successfully, or no matches found
1Invalid argumentsInvalid command syntax
13Unexpected errorSystem exception during uninstall process
87Invalid syntaxMissing filename or file does not exist
1223CancelledUser pressed N when prompted for confirmation
Unattended Mode WarningThe /U switch bypasses all user confirmation prompts. When enabled, you will see:
WARNING: Running in unattended mode. To abort press Ctrl+C or close the window.
ONLY USE AFTER THOROUGH TESTING. Uninstall lists should be as specific as possible to avoid false positives. There are no warranties, use with caution.

export

Export installed application information to an XML file for inventory management, compliance auditing, or backup purposes.

Syntax

BCU-console export [drive:][path]filename [/Q] [/U] [/V]

Parameters

ParameterRequiredDescription
[drive:][path]filenameYesPath where the XML export file should be saved

Switches

SwitchDescriptionDefault
/QQuiet mode - suppress progress messages during app scanningOff
/UUnattended mode - suppress progress messagesOff
/VVerbose logging - show detailed scanning informationOff
The /Q and /U switches affect the application scanning process, not the export itself. They suppress progress messages during the “Looking for applications” phase.

Examples

# Export to XML file
BCU-console export C:\Inventory\installed-apps.xml

Example Output

BCU-console, Version=5.x.x.x, Culture=neutral, PublicKeyToken=null

Starting export to C:\Inventory\installed-apps.xml
Looking for applications...
Found 247 applications.
Exporting data...
Success!

XML Output Format

The exported XML file contains comprehensive application data:
<?xml version="1.0" encoding="utf-8"?>
<ApplicationList>
  <Application>
    <DisplayName>Google Chrome</DisplayName>
    <DisplayVersion>120.0.6099.109</DisplayVersion>
    <Publisher>Google LLC</Publisher>
    <InstallDate>2024-01-15</InstallDate>
    <InstallLocation>C:\Program Files\Google\Chrome\Application</InstallLocation>
    <UninstallString>"C:\Program Files\Google\Chrome\Application\120.0.6099.109\Installer\setup.exe" --uninstall</UninstallString>
    <QuietUninstallString>"C:\Program Files\Google\Chrome\Application\120.0.6099.109\Installer\setup.exe" --uninstall --force-uninstall</QuietUninstallString>
    <AboutUrl>https://www.google.com/chrome/</AboutUrl>
    <EstimatedSize>262144</EstimatedSize>
    <Is64Bit>true</Is64Bit>
    <IsRegistered>true</IsRegistered>
    <RegistryKeyName>Google Chrome</RegistryKeyName>
  </Application>
  <!-- More applications... -->
</ApplicationList>

Return Codes

CodeMeaningWhen It Occurs
0SuccessExport completed successfully
1Invalid argumentsInvalid command syntax
13Unexpected errorSystem exception during export
87Invalid syntaxMissing filename or invalid path

list

Display a formatted list of all installed applications in the console.

Syntax

BCU-console list [/Q] [/U] [/V]

Switches

SwitchDescriptionDefault
/QQuiet mode - suppress progress messages during scanningOff
/UUnattended mode - suppress progress messagesOff
/VVerbose logging - show detailed scanning informationOff

Examples

# Display all installed applications
BCU-console list

Example Output

BCU-console, Version=5.x.x.x, Culture=neutral, PublicKeyToken=null

Looking for applications...
Found 247 applications.
Display Name                              Version               Source
------------------------------------------------------------------------------------------------------
7-Zip 23.01 (x64)                         23.01                 https://www.7-zip.org/
Adobe Acrobat Reader DC                   23.008.20470          https://www.adobe.com/products/reader
Google Chrome                             120.0.6099.109        https://www.google.com/chrome/
Microsoft Edge                            120.0.2210.91         https://www.microsoft.com/edge
Microsoft Office Professional Plus 2021   16.0.17328.20068      https://www.office.com
Mozilla Firefox 121.0                     121.0                 https://www.mozilla.org/firefox/
Notepad++ (64-bit x64)                    8.6.2                 https://notepad-plus-plus.org/
Python 3.12.1 (64-bit)                    3.12.1                https://www.python.org/
VLC media player                          3.0.20                https://www.videolan.org/vlc/
WinRAR 6.24 (64-bit)                      6.24                  https://www.win-rar.com

Output Format

The list command displays applications in a three-column format:
ColumnWidthContentTruncated
Display Name40 charactersApplication nameYes, if longer than 40 chars
Version20 charactersVersion numberYes, if longer than 20 chars
Source40 charactersPublisher website or About URLYes, if longer than 40 chars
Piping OutputThe list command output can be piped to other command-line tools for filtering, searching, or analysis:
# Count total applications
BCU-console list /Q | find /C "https://"

# Find specific publisher
BCU-console list /Q | findstr /I "Microsoft"

# Export to CSV (using PowerShell)
BCU-console list /Q | ConvertFrom-String | Export-Csv apps.csv

Return Codes

CodeMeaningWhen It Occurs
0SuccessList displayed successfully
1Invalid argumentsInvalid command syntax
13Unexpected errorSystem exception during scanning

Global Switches Reference

These switches can be used with any command:
Description: Use quiet (silent) uninstallers wherever possible and suppress progress messages during application scanning.Behavior:
  • Suppresses “Looking for applications” progress messages
  • For uninstall command: Uses silent uninstallers instead of interactive installers
  • Does not affect confirmation prompts (use /U for that)
When to use:
  • Running in scripts where you want minimal output
  • When you don’t want installer windows to appear during uninstallation
  • Scheduled tasks and automation scenarios
Example:
BCU-console list /Q > output.txt
Description: Runs the command without any user interaction. All confirmation prompts are bypassed.Behavior:
  • Skips all “Do you want to continue? [Y]es/[N]o” prompts
  • Automatically proceeds with operations
  • Displays warning: “Running in unattended mode. To abort press Ctrl+C or close the window.”
  • Suppresses application scanning progress messages
When to use:
  • Fully automated scripts and scheduled tasks
  • Remote execution scenarios
  • When you’re certain about the operation and don’t need confirmation
WARNING: Only use after thorough testing. Uninstall lists should be as specific as possible to avoid false positives.Example:
BCU-console uninstall C:\Lists\apps.bcul /U /Q
Description: Enables detailed logging and shows additional information during operation.Behavior:
  • Shows detailed progress messages during application scanning
  • Displays ”-> Inner message” lines with additional context
  • Helps troubleshoot issues by providing more information
When to use:
  • Debugging issues with uninstall lists
  • Understanding what the tool is doing during scanning
  • First-time testing before automating
Example:
BCU-console uninstall C:\Lists\apps.bcul /V
Example verbose output:
Looking for applications...
Scanning registry uninstall keys
-> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
-> HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall
Scanning Windows Store apps
-> Found 15 Windows Store packages
Description: After uninstalling applications, automatically scan for and remove leftover registry entries, files, and folders.Behavior:
  • Runs junk cleanup after successful uninstallation
  • Defaults to “VeryGood” confidence level if no level specified
  • Shows list of junk items found before deleting (unless /U is used)
  • Prompts for confirmation before deleting (unless /U is used)
Syntax:
/J              # Use VeryGood confidence level (default)
/J=VeryGood     # Explicitly specify VeryGood
/J=Good         # Use Good confidence level
/J=Questionable # Use Questionable confidence level (risky)
/J=Bad          # Use Bad confidence level (very risky)
/J=Unknown      # Use Unknown confidence level (extremely risky)
WARNING: Use extreme caution when choosing any level below VeryGood. There are no warranties.Example:
BCU-console uninstall C:\Lists\apps.bcul /Q /J

Return Codes Summary

All BCU-console commands use these standard return codes:

0 - Success

The operation completed successfully. All applications were uninstalled, exported, or listed without errors.

1 - Invalid Arguments

Command syntax error or invalid parameters. Check your command syntax.

13 - Unexpected Error

An unhandled system exception occurred. Check the console output for details.

87 - Invalid Syntax

Missing required arguments or invalid file path. Verify your file paths exist.

1223 - Cancelled

The operation was cancelled by the user pressing ‘N’ at a confirmation prompt.

Error Handling in Scripts

Always check return codes in your scripts to handle errors appropriately:
@echo off
BCU-console uninstall C:\Lists\apps.bcul /U /Q

IF %ERRORLEVEL% EQU 0 (
    echo Success: All applications uninstalled
    exit /b 0
)

IF %ERRORLEVEL% EQU 1 (
    echo Error: Invalid arguments
    exit /b 1
)

IF %ERRORLEVEL% EQU 13 (
    echo Error: Unexpected system error
    exit /b 13
)

IF %ERRORLEVEL% EQU 87 (
    echo Error: Invalid syntax or missing file
    exit /b 87
)

IF %ERRORLEVEL% EQU 1223 (
    echo Operation cancelled by user
    exit /b 1223
)

echo Unknown error: %ERRORLEVEL%
exit /b %ERRORLEVEL%

Next Steps

CLI Overview

Learn about BCU-console features and use cases

Scripting Guide

Real-world automation examples and script templates

Build docs developers (and LLMs) love