2

We are using Linux Jenkins server for our deployment in a Windows machine. We added this machine as a node and running deployment on it. We are using powershell for our deployment, everything is working but for a bat file that uses our application to start is not working properly.

This is our command we used in powershell.

write-host "Starting store" cmd.exe /c c:\store\start.bat 

Its starting the application in windows server but its not completing in Jenkins. Please note our application is a GUI application. See the status in Jenkins

Store Startup... Real Path: C:\store\ PID File: engine.pid Executables: store.exe,python.exe,pythonw.exe PID Dir: C:\store\tmp\ ------------------------ Starting Store... ------------------------ 

After this, its keep on this and further Jenkins step is not executing. But when we check in windows server we can see application is started successfully.

We also tried starting bat file in following ways:

start "" /c 'c:\store\store.bat' Start-Process cmd.exe -Argument "/c c:\store\store.bat" 

While using these options Jenkins coming to next steps and all Jenkins jobs are executing but in windows server application is not started.

Can anyone please help us on it.

1
  • Even I faced similar issue once, Try to add PowerShell Plugin to Jenkins, it resloves the issues Commented Jun 21, 2017 at 11:36

1 Answer 1

2

Fixed it by changing the script as follows:

Start-Process c:\store\store.bat 
1
  • does not work for me - it closes CMD window after Jenkins powershell is done Commented Sep 9, 2019 at 20:00

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.