0

I am running Jenkins as a service and I want to run a batch file, which is quite simple. But the batch file requires a command window to be popped up, now Jenkins will fail when it comes to that. The batch file is as follows, the signing of a file.

    "smctl.exe" sign --keypair-alias=<alias> -d=SHA256 --verbose --config-file <config 
     file> --input "c:\test\test.exe"

Now smctl.exe requires a new window to be popped up , but I dont want that , so is there a way it can run in the background ?

Tiger
  • 53
  • 9
Angela
  • 1
  • 4
  • There is absolutely no need for using a batch file to let *Jenkins* run an executable with several arguments run during execution of a job. It makes no difference for *Jenkins* if it calls `CreateProcess` to run `%SystemRoot%\System32\cmd.exe` with option `/c` and the fully qualified batch file name enclosed in `"` or if it calls `CreateProcess` to run `smctl.exe` with the posted arguments. What can definitely make a difference is the missing full path to executable file `smctl.exe` because of `CreateProcess` usually needs the fully qualified file name of an executable to run. – Mofi Aug 25 '23 at 04:59
  • There should be no problem at all if the executable `smctl.exe` is a Windows __console__ application as such programs usually work running in background without a console window created by `CreateProcess` as it is always the case on an executable is started by a __service__ running with the built-in __SYSTEM__ account of Windows. There is no graphical user interface available at all for processes started in execution environment of built-in __SYSTEM__ account. A graphical user interface is available only for processes started by a standard user account and the user account is signed in. – Mofi Aug 25 '23 at 05:03
  • IF `smctl.exe` is a Windows __GUI__ application working only if the executable itself can open a graphical window, it is necessary to configure the Jenkins job using a pipeline to schedule a job execution until a specific user account is available and this user account is signed in and run the executable in the execution environment of this user account instead of running it in the execution environment of the built-in __SYSTEM__ account in which *Jenkins* itself is running. – Mofi Aug 25 '23 at 05:07
  • There are lots of Stack Overflow questions and answers as well as Jenkins tutorials explaining how to configure a job using a *Jenkins* pipeline to run a GUI executable in the execution environment of a signed in user account with a graphical user interface available at all. – Mofi Aug 25 '23 at 05:09

0 Answers0