lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

You can call "start" first:

os.execute('start "window title" "notepad.exe"')

The problem with start.exe is that the first quoted parameter is the title of the window, so, doing this:

os.execute('start "c:\\full path\\to\\notepad.exe"')

Will open up a console window with the title bar as "c:\\full path\\to\\notepad.exe", so, you have to put whatever infront of it, it can just this:

os.execute('start "blah" "c:\\full path\\to\\notepad.exe"')


// David Morris-Oliveros
// Camera & Lua Coder

Yuanming Chen wrote:
Recently I started to use LUA to write simple scripts to launch windows executables. But I noticed that when I call os.execute("notepad.exe") to spawn notepad application, the execution thread is blocked till one closes the notepad. Is there a way to execute the window executable without blocking? In my project, I don't care about whether the window executable is started correctly or not.

Thanks for any thoughts on this.