cancel
Showing results for 
Search instead for 
Did you mean: 

script run to open an application

former_member214617
Participant
0 Kudos

hi guys I have a script which runs fine from command line and by creating .bat files as well.. but when I am running same script from dataservices, it is not doing anything, kept running..

script needs to open the Snap11.exe and download the data and close the Snap11.exe.

see the script below:-

.bat file

@echo off
start cmd.exe /c F:\Snap_11\Snap11.exe /S "test1.mdf" /IR && timeout 5 && "F:\Snap_11\Snap11.exe" /S "test1.mdf" /DB "test2"

cmd script

F:\Snap_11\Snap11.exe /S "test1.mdf" /IR && timeout 5 && "F:\Snap_11\Snap11.exe" /S "test1.mdf" /DB "test2"

data services script:-

exec('cmd', 'F:\\Snap_11\\Snap11.exe /S "test1.mdf" /IR && timeout 5 && "F:\\Snap_11\\Snap11.exe" /S "test1.mdf" /DB "test2"');

please help me to find an error.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member214617
Participant
0 Kudos

Hi Ravi

I tried executing the .bat file as per your instructions, but nothing happens, job gets stuck and after aborting the job manually no error shown in error log file in management console..

same result if I use print before exec function as well

regards

former_member208402
Active Contributor
0 Kudos

Hi leo dec,

Use print before exec function to see the error in the log. like print(exec()).

try creating a .bat file wit your command and try calling the bat file in the exec function like below.

exec('cmd', 'C:\test.bat', 😎

Thanks,

Ravi kiran.

former_member214617
Participant
0 Kudos

Any help please..