Launching batch file from BOARD 10.5.1
Hi,
I am trying to launch a .bat file using a server side launch procedure to run a python script on the server. The batch file runs when it is manually launched on the server, however it doesn't run when called via the BOARD procedure. I was wondering if anyone else had experienced similar / has been able to launch batch files in the latest version of BOARD?
Thanks,
Stephen
Answers
-
Hi Stephen Kirk,
in my experience things like that are usually related to the user rights. Probably the windows user running the Board Engine misses certain privileges?
Maybe this helps.
BR
Sebastian
1 -
Hi,
to launch .bat scripts Board user must have the parameter "Allow execution of security critical procedures" checked in Board Security:
1 -
Hi,
Still not able to get the batch file to run.
Sebastian Gurt - I have tried running the BOARD engine with administrator account privileges
Samuele Marchetto - I have confirmed this option is enabled on the BOARD account I am using to run the procedure
Can I get anyone to confirm they have got this functionality working on the latest version of BOARD 10?
Thanks,
Stephen
0 -
Hi Stephen Kirk,
yes I can confirm that it works. I just performed a simple test on my local machine:
The file is located at \Board\Job and the .txt file was successfully created.
I use this version (it was the latest until the patch release from yesterday):
Did you run the Board engine in you own user context? Maybe you could reduce the scenario to a simple case like above to check if it is a problem with your script.
Like I said before - in my experience these things are usually related to rights management on windows level. Can you try it on a different environment, maybe your local machine?
BR
Sebastian
1 -
Thanks for the response Sebastian, it's very helpful that I can narrow down what is preventing the batch that I am trying to execute.
That batch file did work for me, so I'm thinking it has something to do with the nature of what I am trying to do with my other files and security as you say. I have tried:
- Launching an exe (python script) located outside of the job directory
- Launching an exe (python script) located inside of the job directory
- Launching internet explorer on the server
- Launching the console and printing to it on the server
1 -
Hi,
I have identified that lines in a batch file that require another program are what is not working from BOARD. Does anyone have any tips to succesfully launch another program from a batch that is used in a BOARD procedure. For example, the batch file:
copy /y NUL TaskStarted.txt >NUL
START \BOARD\Job\test.exe
copy /y NUL TaskCompleted.txt >NULnotepad 'D:\BOARD\Job\TaskCompleted.txt'
Will preform lines 1 and 3 successfully when launched through BOARD, but the launched exe on line 2 does not run as expected (this has dependencies on another program). Neither does line 4 which attempts to open the saved txt file in Notepad. Note that the BOARD service is set to use the administrator account, and the code operates correctly when manually run on the server. Has anyone been able to launch another program server-side via the use of batch files?
Cheers,
Stephen
0 -
Hi Stephen,
Did you have any luck solving this problem?
I am in the exact same situation at a project right now. I need my batch file to launch another program, but this is not working through Board.
Kind Regards,
Glenn
------------------------------
Glenn De Weerdt
BI Consultant
Acumen Consulting BVBA
Belgium
------------------------------
-------------------------------------------0 -
Hi Stephen,
for line two could you explain what test.exe would do normally?
Regarding line 4, I checked this on my side. I am using Board 10.7 but I think this should not be a problem.
I created an simple bat file only with the following line: notepad 'Test1.txt' when I run this throug an server command it works as expected. Only point is that there will be no notepad that opens. Background is that notepad is started in the context of the user that runs the board service. I could only see that it works throug the task manager. Could you check if you see the notepad.exe process within the task manager?
So in general I would say it is possible to run another program via an server command as already mentioned. But it is important to remember that the program is executed in the background so programs like notepad and internet explorer will probably start but you will not see anything. Also if the Board Server is running with the SYSTEM user (that is the default) you are not able to access any network folders and so on.
Kind regards
------------------------------
Andreas Rehmer
Senior BI-Entwickler und ERP Berater
XAX Managing Data & Information GmbH
Germany
------------------------------
-------------------------------------------0 -
I did figure out a work around - I hope you figured out something as well!
- Instead of calling the external program in the .bat which did not work - I created an 'event' that would be viewable by the windows event viewer
- I created a scheduled task which then launches whenever this event is created. In this task - it calls the program to run
Cheers,
Stephen
------------------------------
Stephen Kirk
Consultant
BI5 Solutions
Australia
------------------------------
-------------------------------------------0