Execute .bat file automatically via command line getting https error - batch-file

Here is my .bat file script.
cmd /k "https://exampleserver.com/server/php/ping.php"
When i run .the file via command line it says
'https:' is not recognized as an internal or external command,
operable program or batch file.
How can i run this without any error from command line ? Any help would be greatly appreciated

Related

Error with 'REACT_APP_API_BASE' is not recognized as an internal or external command, operable program or batch file

When i am executing the command REACT_APP_API_BASE=https://ip/api yarn start on Linux system it works fine and i can access the frontend of the application but same command doesnt work on windows and throws and error "'REACT_APP_API_BASE' is not recognized as an internal or external command,
operable program or batch file." How can the same command be used in windows-

'.' is not recognised as internal or external command on windows?

i have the line below in the package.json file.
"start:setup": "./start-setup.sh",
and from windows command prompt i run the command npm run start:setup
and i get this error..
'.' is not recognised as an internal or external command....
what i have tried?
i tried the above command on gitbash and didnt work.
i changed this
"start:setup": "./start-setup.sh",
to
"start:setup": "sh start-setup.sh",
and error sh is not an external or internal command is thrown
Could someone help me fix this. thanks.
.sh is a Linux shell file.
Windows doesn't process such files by default.
If you want, you could try installing bash for windows.

Running batch file which runs 2 other batch files from SQL Server job

I have this step in sql server job
AAA.bat content is this
call BBB.bat
call CCC.bat
BBB.bat and CCC.bat each run ETL packages.
When I run above step it throws error
BBB.bat is not recognized as an internal or external command, operable
program or batch file... CCC.bat is not recognized as an internal or
external command, operable program or batch file
However, when I replace AAA.bat with either BBB.bat or CCC.bat it works as intended.
Are BBB.bat and CCC.bat in the same directory as AAA.bat? You need to set the working directory first. In AAA.bat add the following at the top of the file:
cd /d D:\Path\Client1
Or, call BBB.bat and CCC.bat using their full path.
A possibly better solution, depending on your environment and needs, would be to have your job contain two steps, each one calling the appropriate batch file (BBB or CCC) separately. That way, if you have a failure, its very obvious which batch file had a problem.

MSBuild execution fails through jenkins whereas same command runs properly through command prompt

I tried to execute the below command from Jenkins, and I got below error. I tried to print the command and executed the same command through cmd.exe and it runs successfully. I checked the folder permission and it is having the write permission. I ran jenkins using war file and saw it is executing under the same user as cmd.exe is running
Command that is executed on both jenkins and cmd.exe is,
"C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe" "d:\jenkins\workspace\NewTestItem\App\abc.sln" /t:rebuild /p:PackageLocation=d:\jenkins\workspace\NewTestItem\iisPackageDeploymentDir\26\ /p:DeployOnBuild=True /p:Configuration=Release /m /v:d /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false
Error which I am getting in jenkins
Microsoft.Common.CurrentVersion.targets(3821,5): error MSB3021: Unable to copy file "d:\jenkins\workspace\NewTestItem\App\mgmt\UserGuide\US\help.pdf" to "bin\mgmt\UserGuide\US\help.pdf". Access to the path 'bin\mgmt\UserGuide\US\help.pdf' is denied.
Note : Solution contains multiple project

how to run autoIT through Jenkins

I am trying to run my protractor scripts through Jenkins, I have a script where autoIT need to execute, to upload a file.
When i run protractor command through "Execute Windows batch command" i get the following error:
" 'protractor' is not recognized as an internal or external command,
operable program or batch file. "
I have set the Jenkins slave path. Could any one please help to solve this.
When i run through SSH command, protractor was able to run but could not start execution of "autoIT".

Resources