Search code examples
sikuli

How to open an .exe through the Command Line in Sikuli?


I have PL/SQL Developer installed, and I am trying to get Sikuli to open it through the Command Line.

If I do it manually I do:
1) Open CMD
2) "C:\Program Files (x86)\PLSQL Developer\plsqldev.exe"
3) [Enter]

This is my code:

vcCMD = '"C:\Program Files (x86)\PLSQL Developer\plsqldev.exe"'
App.open('CMD ' + vcCMD)

It did log that the App.open() has runned, but the .exe does not open.

[log] App.open CMD "C:\Program Files (x86)\PLSQL Developer\plsqldev.exe"

Does anyone know how to do this?


Solution

  • Found the answer, I needed /C

    vcCMD = '"C:\Program Files (x86)\PLSQL Developer\plsqldev.exe"'
    App.open('CMD /C ' + vcCMD)
    

    Or even more simple:

    run(vcCMD)