The online racing simulator
Running external apps through the script system
Hi,
is it possible to run an external app (.exe file) through the scripting system?
Thanks
#2 - Jakg
no, its not
/exec
Hi Falcon1,
I was looking for informations about the scripting system and i believe that i found (It Worked) a way not only to run commands locally, but also on the server (Dedi Host) side.

So what i have managed to do after a lot of digging is:
I created a folder named "script" in my dedi host path(data\script).
I created three Scripts with .lfs extension (The number of scripts can be infinite)
1st script Total restart of Dedi Host and insims(Vcom&LFSLapper).
2nd script Restart Vcom insim
3rd script Restart LFSLapper insim

Now in case of a total crash of the insims i can restart all of them or one by one.

All i used is a combination of LFS commands + some good old dos commands:
/exec (runs a script or a .bat extension file in my case, locally)
/hrun (runs a script or a .bat extension file in my case, on server side "host")

So my final file/script structure is:

killL.lfs -> having just one line with
Quote :/exec killL.bat (the killL.bat is placed on the root folder of LFS were LFS.exe is placed)

killL.bat ->
Quote :@ECHO OFF
taskkill LFSLapper.exe (Taskkill is an internal command of Windows Xp Pro & 2003) Drops LFSLapper.exe process.

echo Waiting for LFSLapper process to drop (just a text to echo)
ping -n 5 localhost > nul (Trick delay of 5 seconds) There is no sleep/wait/pause command that can make a delay for a specific time in dos without user interaction.
cd "E:\LFS_DEMO_DEDI_X10\LFSLapper5.12\bin" (Get to the path of the executable)
start LFSLapper.exe (Start the app)

After everything is set. I log on to the server as an admin and just type the command for the script i want to execute.
Quote :/hrun killL (I tried running the script by giving the exact path or even with the exact script name "killL.lfs" but it didn't worked so just try with the name not + the extension)

I thought that all these might be an interesting case of using the script system and from my point of view after the success of these commands the possibilities of handling a server, are endless.

I hope you (or anyone else) will find these informations useful.

Take care CU On Line.

FGED GREDG RDFGDR GSFDG