Mandatory prerequisite error for visual C++ 2008

Asked by Michael Sweeney

When running a script in Sikuli, I keep getting the following error:

"You are missing a mandatory prerequisite and should not run the product until you install or upgrade Visual C++ Runtime 9.0.30729. Use the diagnostics window for more details."

Script:

MyPath = r'C:\Mypath'
openApp(MyPath)
wait("Login.png",300)
click("Username.png")
type('MyUserName')
click("Password.png")
type('MyPassword')
click("1346776285902.png")

Details in Sikuli IDE (I'm running Sikuli X-1.03c3 (r905):

[error] Error message: Traceback (most recent call last):
File "C:\Users\msweeney\AppData\Local\Temp\sikuli-tmp2843484462257973731.py", line 4, in
click("Username.png")
Line 8, in file C:\Users\msweeney\AppData\Local\Temp\sikuli-tmp2843484462257973731.py

at org.sikuli.script.Region.handleFindFailed(Region.java:420)
at org.sikuli.script.Region.wait(Region.java:511)
at org.python.proxies.sikuli.Region$Region$0.super__wait(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)

org.sikuli.script.FindFailed: FindFailed: can not find Username.png on the screen.
Line 8, in file C:\Users\msweeney\AppData\Local\Temp\sikuli-tmp2843484462257973731.py

Some or all of the traceback error message may be because the first error ("... missing mandatory prerequisite...") is obscuring the UI when it pops up, including the controls Sikuli is looking for. The script successfully launches my application, then I get the error. I don't see this error when I run the app manually-- only when trying to run it via Sikuli.

The machine is a Windows 7 machine (64-bit). I installed a 32-bit version of the Java 7 JRE, and I've made the changes to point to the JRE7 bin directory in the batch files and PATH environment variables. If I look at a list of installed programs, I DO see that the Visual C++ Runtime is installed (the version number in the error message corresponds to Visual C++ 2008), and I've run Windows Update multiple times to check for all available updates.

Does anybody have any ideas about what might be causing the error?

Question information

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

the needed runtime dll's come with Sikuli in the libs folder.

So I guess, somewhere in your system path BEFORE the sikuli-libs entry Windows finds these dll's from a newer version.

So make sure, that the stuff from sikuli-lib is found first.

Revision history for this message
Michael Sweeney (msweeney231) said :
#2

Thanks for the reply...

I think there's a dll conflict somewhere; I tried shifting the sikuli-libs entries around to be earlier in the PATH variable, but that didn't seem to help. I tried running Notepad with a similar script and didn't have any problem-- so it might have been some sort of conflict between Sikuli and my application specifically (my application has dependencies on Visual C++ runtimes as well). My first thought was that Sikuli's PATH entry may have been causing problems for the application I'm testing (the problem you indicated, but in reverse), but I thought that would ALWAYS cause problems for my app; like I said, I only see an issue when both are running at the same time.

At any rate, I ultimately tried the portable version of Sikuli and that seems to work fine in my case.