'C:\Program' is not recognized as an internal or external command, operable program or batch file - How should I solve this problem?

481    Asked by dipesh_9001 in Salesforce , Asked on May 23, 2023

Right now i'm starting to work on Salesforce technology, in windows, and currently i follow the tutorial. When I finally arrived at the terminal part, Windows came out to create a problem...

I state that I am using the terminal of Git Bash Here (MinTTY)

$ sfdx force:data:record:create -s Account -v "Name='Hilton Union Square' BillingStreet='333 O Farrell St' BillingCity='San Francisco' BillingState='CA' BillingPostalCode='94102' Phone='(415) 771-1400' Website='www.hilton.com'" "C:Program" non è riconosciuto come comando interno o esterno, un programma eseguibile o un file batch.

More in general, the problem comes out every time there are Quote in the argument:

$ sfdx "" "C:Program" non è riconosciuto come comando interno o esterno, un programma eseguibile o un file batch.

opposite to:

$ sfdx Salesforce CLI VERSION sfdx-cli/7.157.0 win32-x64 node-v16.15.1 USAGE $ sfdx [COMMAND] TOPICS alias manage username aliases auth authorise an org for use with the Salesforce CLI config configure the Salesforce CLI ......

I try almost every thing: alias, Path, Full Path, Short Path, Quote, ... this is my current path:

PATH=/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/A409806/bin:/c/Program Files/Common Files/Oracle/Java/javapath:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/WINDOWS/System32/OpenSSH:/c/Program Files (x86)/WindowsPowerShell/Scripts:/cmd:/c/Program Files/nodejs:/c/Users/A409806/AppData/Local/Microsoft/WindowsApps:/c/Program Files/sfdx/bin:/c/Users/A409806/AppData/Roaming/npm:/c/Users/A409806/AppData/Local/Programs/Microsoft VS Code/bin:/c/Users/A409806/AppData/Local/JetBrains/Toolbox/scripts:/usr/bin/vendor_perl:/usr/bin/core_perl


Please, someone help me. I suppose it is a MinTTY problem, but I can't imagine how to solve it.

Answered by Ella Clarkson
To solve this problem - 'C:Program' is not recognized as an internal or external command, operable program or batch file 

When you install SFDX CLI on windows, the PATH variable is automatically set by SFDXL CLI Installer.
I will suggest the things below.
Uninstall SFDX CLI from the Windows system.
Remove any environment variable you set for SFDX CLI.
Restart the system.
Try installing SFDX CLI latest version with all default values.
If you still face issue about "C:Program" is not recognized as internal or external command then append in PATH variable as below,
C:Progra~1sfdxin
You can change sfdxin part depending upon your installation path.
C:Progra~1 is equivalent to C:Program Files


Your Answer

Interviews

Parent Categories