Salesforce CLI Silent Install (How-To Guide)

The Salesforce CLI is a powerful command line interface that simplifies development and build automation when working with your Salesforce org. This article will serve as an informative guide and give you a clear understanding of how to perform a silent installation of the Salesforce CLI from the command line using the EXE installer.

How to Install the Salesforce CLI Silently

Salesforce CLI x86 Silent Install (EXE)

  1. Navigate to:
  2. Download the sfdx-x86.exe to a folder created at (C:\Downloads)
  3. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  4. Navigate to the C:\Downloads folder
  5. Enter the following command: sfdx-x86.exe /S
  6. Press Enter

After a few moments you will find Salesforce CLI entries in the Installation Directory and Programs and Features in the Control Panel.

Software Title:sfdx-cli
Vendor:Salesforce
Architecture:x86
Installer Type:EXE
Silent Install Switch:sfdx-x86.exe /S
Silent Uninstall Switch (32-bit System)"%ProgramFiles%\sfdx\uninstall.exe" /S
Silent Uninstall Switch (64-bit System)"%ProgramFiles(x86)%\sfdx\uninstall.exe" /S
Download Link:https://developer.salesforce.com/tools/sfdxcli
PowerShell Script:https://silentinstallhq.com/salesforce-cli-install-and-uninstall-powershell/

Salesforce CLI x64 Silent Install (EXE)

  1. Navigate to:
  2. Download the sfdx-x64.exe to a folder created at (C:\Downloads)
  3. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  4. Navigate to the C:\Downloads folder
  5. Enter the following command: sfdx-x64.exe /S
  6. Press Enter

After a few moments you will find Salesforce CLI entries in the Installation Directory and Programs and Features in the Control Panel.

Software Title:sfdx-cli
Vendor:Salesforce
Architecture:x64
Installer Type:EXE
Silent Install Switch:sfdx-x64.exe /S
Silent Uninstall Switch:"%ProgramFiles%\sfdx\uninstall.exe" /S
Download Link:https://developer.salesforce.com/tools/sfdxcli
PowerShell Script:https://silentinstallhq.com/salesforce-cli-install-and-uninstall-powershell/

The information above provides a quick overview of the software title, vendor, silent install, and silent uninstall switches. The download links provided take you directly to the vendors website. Continue reading if you are interested in additional details and configurations.


Additional Configurations

Change the Salesforce CLI Default Installation Directory

You can change the default installation directory by using the following command line parameters. In this example, I’m installing Salesforce CLI to “C:\sfdx”.

sfdx-x64.exe /S /D=C:\sfdx

How to Uninstall the Salesforce CLI Silently

Check out the Salesforce CLI Install and Uninstall (PowerShell) post for a scripted solution.

  1. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  2. Enter one of the following commands:

Salesforce CLI x86 Silent Uninstall (EXE) on 32-bit System

"%ProgramFiles%\sfdx\uninstall.exe" /S

Salesforce CLI x86 Silent Uninstall (EXE) on 64-bit System

"%ProgramFiles(x86)%\sfdx\uninstall.exe" /S

Salesforce CLI x64 Silent Uninstall (EXE) on 64-bit System

"%ProgramFiles%\sfdx\uninstall.exe" /S

Always make sure to test everything in a development environment prior to implementing anything into production. The information in this article is provided “As Is” without warranty of any kind.