The online racing simulator
#1 - gru
[Vista] start LFS from another program
hi

im developing Digital Speedo mod http://www.lfsforum.net/showthread.php?t=44054
it has function to run programs on start, and there is problem with LFS on Vista, it always starts windowed, even if its set to fullscreen (cfg: Start Windowed 0)

it happens only if LFS is started through my program, works fine if started manually

one of racers reported this bug, and since im using XP, i cant check it myself
maybe some of U had similar problem, or can write small program to test it on Vista (i can send DS source code if its necessary)

here's pseudo code

Process p = new Process();

p.StartInfo.FileName = [I]lfs_path[/I];
p.StartInfo.WorkingDirectory = Path.GetDirectoryName([I]lfs_path[/I]);
p.StartInfo.Arguments = [I]lfs_arguments[/I];

p.Start();

what am i missing?
I do the same for SIG (http://www.setupgrid.net/sig) and my solution also work in Vista. LFS is started with this command:

String command = "rundll32 SHELL32.DLL,ShellExec_RunDLL \"" + lfsHome + "LFS.exe\" /insim=" + port;

#3 - gru
thx, i was missing:

p.StartInfo.UseShellExecute = true;

which is weird, because its set to true by default

FGED GREDG RDFGDR GSFDG