I attempted to execute the following command in a Jenkins batch script to run the executable named "GitFetcher.Exe," which is located within the tools directory of "IB.SO.AutoUtility."
dotnet tool install dotnet-ef --global
dotnet tool install IB.SO.AutoUtility --add-source "https://nexus.internal.com/repository/my-development/" --version 1.0.7 --global
GitFetcher
Unfortunately, it was running perfectly on my machine. However, when I execute this command in a Windows batch script within Jenkins, it produces an error stating that GitFetcher is not recognized as an internal or external command in the Jenkins console.
Could someone please provide the correct method to run an executable within Jenkins?
GitFetcheris most likely added to system or user environment variablePathbut not to the local environment variablePATHof the runningcmd.exeprocess. The Windows Command Processor cannot find a file with nameGitFetcherfor that reason. If you know where GitFetcher is installed by default using the standard installation, reference the fileGitFetcherin the batch file with its fully qualified file name, i.e. drive + path + name + extension enclosed all in".PATHis managed on Windows and howcmd.exeuses it to find executables and script files specified in a batch file or by a user with just its file name without full path and without file extension.