Unsatisfied Linked Error :VisionProxy.dll: Can't find dependent libraries when a batch file is run using windows scheduler

Asked by Omkkumar

Hi,

I am a fresher to sikuli and i tried to develop a script which runs in the eclipse IDE .

Also i am able to run my script through the command prompt with the command "java -cp "c:\Program Files\Sikuli X\sikuli-script.jar" org.python.util.jython c:\myworkspace\myscripts.py"

I created a batch file with the above command and placed it where my sikuli script exists. The script executes when i doubleclick it

But when i use a windows scheduler and schedule the above batch file to run i am getting the error

C:\users:\Appdata\Local\Temp\ :Unsatisfied Linked Error :VisionProxy.dll: Can't find dependent libraries

My environment variable are set as below

path:c:\Program Files\Sikuli X\Libs;c:Program Files\Java\jre6\bin;
SIKULI_HOME:c:\Program Files\Sikuli X\Libs

what i am doing here wrong?
Please help me.
Much Thanks !!!

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

--- might be typos, but it should be:

path:
c:\Program Files\Sikuli X\libs;c:Program Files\Java\jre6\bin;

SIKULI_HOME:
c:\Program Files\Sikuli X\

--- when i use a windows scheduler
You have to setup ALL environment again in the command file you are calling.
And there might be access right issues, depending on the task setup.

Revision history for this message
Omkkumar (varsini1989) said :
#2

Hi Raiman,
I tried the above said points suggested by you
I now created three batch files :

In Path.bat i had the command "SETX var Path="C:\Program Files\Sikuli X\libs";"C:\Program Files\Java\jre6\bin"

In SIKULI_HOME.bat i had the command "SETX var Path="C:\Program Files\Sikuli X\"

And in Add.bat i had the command
CALL Path.bat
CALL SIKULI_HOME.bat
java -cp "c:\Program Files\Sikuli X\sikuli-script.jar" org.python.util.jython c:\myworkspace\myscripts.py

I saved all the three in the folder where my sikuli scripts exists
I have admin access to my machine
when i schedule my "Add.bat" file to run via scheduler keeping the starting point to the folder where i have placed my scripts
Path.bat and SIKULI_HOME.bat executes successfully and i am getting a message"SUCCESS: value was saved"
After that i am getting the error "C:\Program Files\Sikuli X\libs :Unsatisfied Linked Error :VisionProxy.dll: Can't find dependent libraries

Please help me !!

Revision history for this message
Best RaiMan (raimund-hocke) said :
#3

SETX does not set environment variables for the current command line, you have to use the normal set command.

make ONE command file:
set PATH=%PATH%;c:\Program Files\Sikuli X\libs;c:Program Files\Java\jre6\bin
set SIKULI_HOME=c:\Program Files\Sikuli X\
java -cp "%SIKULI_HOME%sikuli-script.jar" org.python.util.jython c:\myworkspace\myscripts.py

Revision history for this message
Omkkumar (varsini1989) said :
#4

Hi Raiman,

Revision history for this message
Omkkumar (varsini1989) said :
#5

Hi Raiman,

Thanks a lot.
That solved my problem

Revision history for this message
Omkkumar (varsini1989) said :
#6

Thanks RaiMan, that solved my question.