Hi all,
I have a situation where I need to execute a .bat file from LC. Is that possible and how should I approach this?
Thanks in advance
Cheers
Kim Christensen
Dafolo A/S
Views
Replies
Total Likes
Use the following syntax to execute the batch file.
Views
Replies
Total Likes
Hi Nith,
I tried your suggestion – however it does not work as I expected. The process seems to execute – however nothing of what is in the bat file is done:
E.g. I have this bat file – and when I run it with your suggestion in LC nothing happens – when I run it on the server I get the copy of the file:
I have added the following in my Execute Script service action:
Runtime.getRuntime().exec("cmd /c c:\\file.bat");
The .bat file looks like this:
ECHO OFF
COPY "C:
installer_debug.txt" "C:
new_installer_debug.txt"
PAUSE
When I run the cmd /c c:\\echoName.bat in the "Run" window on the server it executes as expected, but not when I invoke the Process through Workbench.
What am I doing wrong – do I need to setup something on my server (Systems is: JBoss Turnkey, MySQL, LC 2.5)?
\Kim
Views
Replies
Total Likes
Your batch file should be placed in server or in a shared folder where the
server has access.
Views
Replies
Total Likes
Hi again,
The .bat file is located here: c:\file.bat
on the server. When I invoke the process through Workbench nothing happens, but when I execute "cmd /c c:\file.bat" in "Run" on the server then the .bat file is executed.
Cheers
Kim Christensen
Dafolo A/S
Views
Replies
Total Likes
Views
Likes
Replies