Mastering GetItCmd.exe: The Complete Guide To Delphi Command Line Package Management
GetItCmd.exe is the command-line interface for the Embarcadero GetIt Package Manager, enabling developers to automate the installation, removal, and listing of libraries and tools within the RAD Studio ecosystem. By utilizing specific switches such as -i for installation and -l for listing, users can achieve 100% parity with the IDE-based GUI while integrating package management into CI/CD pipelines and automated build environments.
Essential Environment and Pre-Configuration Requirements
Before attempting to execute commands via GetItCmd.exe, a developer must ensure the local workstation or build server meets the technical baseline required for the RAD Studio ecosystem. This utility does not function as a standalone downloader; it is deeply integrated into the registry entries and file structures of an existing Delphi or C++Builder installation.
Mandatory Technical Prerequisites
- RAD Studio Installation: A valid installation of Embarcadero RAD Studio (version 10.3 Rio or later is recommended for full command-line stability).
- Administrative Privileges: The command prompt or PowerShell instance must be executed with elevated "Run as Administrator" permissions to modify the program files and registry keys associated with package deployments.
- Active Subscription/License: An authorized Embarcadero license must be active on the machine. GetItCmd.exe validates the license level (Professional, Enterprise, or Architect) before permitting access to specific premium packages.
- Environment Variables: The system PATH must include the RAD Studio bin directory, or the user must execute the rsvars.bat file to initialize the necessary compiler and tooling paths.
Estimated Implementation Metrics
- Initial Setup Time: 5 to 10 minutes for environment configuration.
- Execution Latency: Package metadata queries typically resolve in 2-5 seconds depending on internet bandwidth.
- Hardware Overhead: Minimum 4GB of available RAM and at least 10GB of free disk space for temporary package extraction and final installation.
Step-by-Step Execution for Automated Package Management
Efficient use of GetItCmd.exe requires a methodical approach to identifying package identifiers and managing dependencies. Unlike the GUI, the command-line tool requires exact string matching for package names or specific index IDs.
Step 1: Initializing the Developer Command Environment
To begin, you must ensure the operating system recognizes the GetItCmd command. This is best achieved by utilizing the Command Prompt provided by RAD Studio or by calling the environment initialization script. Navigate to your installation's bin folder, typically located at C:\Program Files (x86)\Embarcadero\Studio\VERSION\bin.
Locate the file named rsvars.bat and execute it within your current command session. This script populates the session variables with the correct paths for the compiler, debugger, and the GetItCmd utility itself. Once this is complete, typing the command name followed by the help switch—GetItCmd.exe -?—should return a list of available parameters, confirming the environment is ready for operation.
Step 2: Querying and Filtering the Package Catalog
The most common starting point is identifying the available software packages. To see a full list of every package available for your current version of RAD Studio, use the list command.
- Run GetItCmd.exe -l to generate a comprehensive list of all available items.
- To refine these results, use the filter parameter. For example, to find specific libraries related to the FireMonkey framework, you would append the filter switch followed by the category name.
- Pay close attention to the Package ID and Version Number. These are the unique identifiers required for subsequent installation steps.
Pro-Tip: Pipe the output of the list command to a text file (using the greater-than symbol) to create a searchable local manifest of available packages, which is invaluable for identifying exact spelling and versioning for complex dependencies.
Step 3: Executing a Targeted Package Installation
Once the specific package name or ID is identified, the installation process can be initiated. This step is critical for build servers where manual GUI interaction is impossible. The syntax requires the -i (install) switch followed by the precise package name.
For instance, if you are installing a popular library like the "OmniThreadLibrary," the command must match the GetIt registry name exactly. During this phase, GetItCmd.exe will reach out to the Embarcadero servers, download the compressed archive, and extract it into the CatalogRepository folder within your user documents. It then triggers the necessary registry updates so the IDE recognizes the new components upon the next launch.
Warning: Ensure that no instances of bds.exe (the RAD Studio IDE) are running during the installation process. File locks on registry hives or common BPL files can cause the installation to fail silently or result in corrupted package registrations.
Step 4: Verification and Removal Procedures
After installation, it is vital to verify that the package is correctly registered. You can run the list command again, often combined with a count switch, to verify the number of installed items has increased.
If a package needs to be updated or removed due to a version conflict, use the -u (uninstall) switch followed by the package name. This process cleanly removes the entries from the Windows Registry and deletes the associated source files from the repository, ensuring a clean state for subsequent installations or upgrades.
What Is Perfmon.exe? How to Use Windows Performance Monitor
Standard Command Switches and Operational Parameters
The following table outlines the technical specifications for the primary flags used by GetItCmd.exe. These parameters dictate the behavior of the utility and are essential for scripting.
| Parameter Flag | Function Description | Technical Requirement |
|---|---|---|
| -l | List Packages | Requires active internet connection to refresh the catalog cache. |
| -i:[Name] | Install Package | Case-sensitive; must match the internal GetIt manifest name. |
| -u:[Name] | Uninstall Package | Removes registry entries and deletes repository source files. |
| -filter:[Cat] | Category Filtering | Valid categories include Libraries, Components, Trial, and Tools. |
| -count | Return Total Count | Often used in scripts to verify the number of available updates. |
| -? | Display Help | Outputs version information and valid syntax examples. |
| -c:[Version] | Target IDE Version | Allows specifying which RAD Studio version to target (e.g., 22.0). |
Common Operational Failures and Technical Remedies
Even with a perfect environment, command-line package management can encounter hurdles related to network security, file permissions, and license validation.
Failure Scenario: "Package Not Found" error despite correct spelling.
- Root Cause: The local GetIt cache is out of sync with the Embarcadero server, or the package is not available for the specific version of RAD Studio installed.
- Actionable Fix: Clear the temporary files in the CatalogRepository folder and ensure the -c switch is pointing to the correct registry hive for your RAD Studio version. Verify the package's availability on the web-based GetIt portal to ensure it hasn't been deprecated.
Failure Scenario: Installation hangs indefinitely at 0% or 50%.
- Root Cause: A firewall or proxy server is intercepting the HTTPS request to the Embarcadero CDN, or the Windows Background Intelligent Transfer Service (BITS) is disabled.
- Actionable Fix: Whitelist the Embarcadero download domains in your corporate firewall. If using a proxy, ensure the system-level proxy settings (configured via netsh winhttp) are correctly set to allow CLI tools to bypass the gateway.
Failure Scenario: Access Denied error during registry write phase.
- Root Cause: The utility is being executed from a standard user prompt rather than an elevated Administrative prompt.
- Actionable Fix: Close the current terminal and reopen CMD or PowerShell by right-clicking and selecting "Run as Administrator." Confirm that the current user has write permissions to the HKEY_CURRENT_USER\Software\Embarcadero\BDS registry key.
Failure Scenario: "License Validation Failed" during premium component install.
- Root Cause: The package requires an Enterprise-grade license, but the machine is registered with a Professional or Community Edition license.
- Actionable Fix: Open the License Manager in RAD Studio to confirm the edition. If the license is correct, try "Refreshing" the license in the License Manager to force a re-validation with the Embarcadero servers.
Frequently Asked Questions
Can I use GetItCmd.exe for offline installations?
No, GetItCmd.exe is designed as an online-first utility that requires a connection to the Embarcadero servers to validate the catalog and download files. For offline scenarios, you must use the ISO installer or manually move the CatalogRepository folders from an online machine to the offline one and merge the registry keys.
Does GetItCmd.exe support automatic dependency resolution?
GetItCmd.exe handles basic dependencies if they are defined within the package manifest. However, if a library requires a third-party tool not hosted on GetIt, you must install that prerequisite manually before running the install command for the primary library.
How do I automate multiple package installations in a script?
You can create a batch (.bat) or PowerShell (.ps1) script that calls GetItCmd.exe -i for each package sequentially. Ensure you include error checking by monitoring the %ERRORLEVEL% variable after each command to stop the script if an installation fails.
Is it possible to update all installed packages at once?
Currently, there is no single "update-all" switch in GetItCmd.exe. The standard workflow involves listing the packages, identifying those with newer version strings, and running the install command for the new version, which typically overwrites or side-loads the update.
Where are the downloaded files stored by GetItCmd.exe?
By default, the utility stores downloaded source code and binaries in the C:\Users\Public\Documents\Embarcadero\Studio\XX.0\CatalogRepository directory. This path can be modified within the IDE options, which GetItCmd.exe will then respect.
Advanced Infrastructure Integration
Integrating GetItCmd.exe into your professional workflow ensures that every developer on your team and every build agent uses the exact same versions of third-party libraries. By scripting your environment setup, you eliminate the "it works on my machine" syndrome and create a repeatable, reliable development lifecycle.