Run a command without the command line running in a new window - windows

I am trying to run a command from a node.js app that's installed on the machine. The command runs fine (it is a command to launches Tomcat). However, the command I run actually open the command line window that is launching Tomcat. Is there a way to do the same thing (run the same command to launch Tomcat) but without the command line window opening up?
Let me know if you need more info!

Your problem isn't with node.js but rather with tomcat. You are probably running the wrong command.
instead of calling catalina.bat start, rather call catalina.bat run.
alternatively you can set it up as a service and call net start tomcatX

Related

"Error 7: Hardlock not found" when starting CANape from command line via Jenkins

Trying to launch Vector CANape via the command line canape32 command, and it works perfectly in the windows command prompt. When attempting to run a windows batch command in our Jenkins multibranch pipeline to do the same thing, it successfully loads the remote client DLL file and then gets stops on "Error 7: Hardlock not found." This error persists in a freestyle project as well, any clues as to what the difference in the environments is? I would expect since it runs the canape32 command just like in the regular command prompt it would work just fine, but I must be missing something.
This is a due to Jenkins redirecting the consule output. When using Vector's ASAP2 Toolset instead of CANape to generate A2L files you can disable the output via the INI files so this doesn't occur.

Executing a .CMD script from Control-M is not working

We have a .CMD script that we are triggering from Control-M.
A main.cmd is being called from Control-M. This script is run as 'accnt_svc' service account which we also configured in Control-M. Prior to setting up in Control-M, we testing this running fine when ran from command prompt (as administrator) and via Windows Task Scheduler being run as the 'acct_svc' service account.
When running in Control M, the log shows error saying a subscript (say sub.cmd is being called from main.cmd) saying the sub.cmd is invalid.
We checked the permissions and they both have the same settings.
We tried another script, this time we created a wrapper which 'calls' the main script. This worked fine.
Please check following wrapper:
SET V_CMDDRV=E:
%V_CMDDRV%
CD %V_CMDDIR%
CALL CALL %V_CMDDIR%\main.cmd
When we create a Main_Wrapper.cmd calling the main.cmd this works fine.
May I know why Control-M behaves this way?
Thanks
When issuing a command via Control-M it will by default run from your run as users home directory. From the output you've attached it looks like main.cmd might need to be run from E: instead of the %HOMEPATH% of the acct_svc service account.

Execute exe-file over ssh from Jenkins

I'm having a issue with CI where after i deployed a build i can't get the new version to start. In Jenkins the console output just keeps spinning when it hit the part of the batch file to start the exe-file and then times out.
I have tried both to run it inside the batch file and from the SSH command line but i can't get it to start on our Windows server.
Any suggestions?

How to run selenium server in the background using windows batch script in Jenkins?

I am running protractor tests on a server machine through Jenkins. I need to start the selenium web driver before running the tests. i.e. "webdriver-manager start" and run the tests while the server is running and shut it down once tests are run. How do I do this using batch script?
I am using start, cmd commands in the batch file to achieve it but once the selenium server starts, I am unable to go back to the prompt unless I stop it.
How to I make it run in the background by staying in the same command prompt window rather than opening up the new command prompt window selenium server starts?
you should run webdriver-manager start as shell script.
Make sure
1 - Node.js installed on jenkins
2 - provide correct path to webdriver-manager

Is there a way to open an interactive Command Prompt from a service?

When I try to execute "vstest.console.exe" file in Jenkins CI (service mode), it responses
Error: Could not start test run for unit tests for Windows Store app:
Unit tests for Windows Store apps cannot be run from a service or non
interactive process. Please run unit tests from an interactive
process..
However it will be able to run successful if I execute the same command from a Command prompt.
So I want to ask if there is a way to open Command Prompt from a service such as Jenkins CI.
I have tried with "start ExecuteVSTest.bat /I /K /REALTIME" but the result is still the same.
I couldn't find a way to open Command Prompt from a service. However I am able to resolve the problem between Jenkins CI and "vstest.console.exe".
We just need to deploy Jenkins from the WAR file via Tomcat server instead of installing Jenkins service native package.
Since the Tomcat is running in the console mode so Jenkins CI won't have the same trouble when executing "vstest.console.exe" as when it run in service mode.

Resources