exe wont run from scripts

rlm1murphy

New Member
I have created an exe with MS Visual Studio. This app runs from scenes, but will not run run from lua script using os.execute(string.format('start /c "Title" "%s" sss', "C:\_LocalApps\obs2ptz\obs2ptz.exe" ) ). When run without "/c" the dos window stays open shows the command but it does not run, no error message.
 
As far as I see, backslashes in the command path need to be escaped to \\ or you have to use 'C:\_LocalApps\obs2ptz\obs2ptz.exe' instead of "C:\_LocalApps\obs2ptz\obs2ptz.exe" . They're not being interpreted again with string.format since you gave 'start ...' and not "start ..." but with interpolating the parameter values interpolation takes place. To avoid, you can probably also give / instead of \\ as path separator.
 
Back
Top