License from €75 Log in
DE EN FR ES IT CZ

Open an exe file located in the game directory (SOLVED)

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 14 years ago
    Hi,

    Is there any way to open an exe file that is located in the game directory?

    For example, I have an external exe files (called "options.exe) that allows the players to change some game settings.

    In "Scene object > Actions > Left click > Execute a script", I tried to cheap it with the command
    startDefaultBrowser('options.exe')
    

    but of course it doesn't work smile

    Thank you in advance for your help smile
  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license.

    See licenses Try it for free
  3. · 14 years ago
    Hi,

    Lua has commands for that, os.execute() is your call, see more here http://www.lua.org/manual/5.1/manual.html#pdf-os.execute
  4. · 14 years ago
    Thank you SimonS.

    So do you think that my problem is solved with this code?
    os.execute (options.exe)
    


    Or this is not the correct syntax?
  5. · 14 years ago
    You need quotes, so to say:
    os.execute ("options.exe")
    


    Problem is the search path, I don't know where your program will be. If I recall correctly, the Lua path is in Windows set to the Working Path (Path of the application visplayer.exe), other platforms behave differently.
    You must try out.
  6. · 14 years ago
    Thank you. I will try it out smile
  7. · 14 years ago
    If I put the options.exe file inside the main directory of the game and then I set the command

    os.execute ("options.exe")
    


    Everything works correctly!

    Thank you!

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?