How do I run an executable using Lua?

Brian T Hannan picture Brian T Hannan · May 13, 2010 · Viewed 39.3k times · Source

I have an executable I want to run using Lua ... how do I do this?

Can't seem to find any documentation anywhere about this.

Answer

Anthony M. Powers picture Anthony M. Powers · May 13, 2010

You can use Lua's native 'execute' command.

Example:

os.execute("c:\\temp\\program.exe")

Sources: Lua Guide / os.execute