Greg,
Quote:
|
Originally Posted by hartsteins
Is there a way to open one shortcut when media center closes and another when media center re-opens?
Additionlly, is there a way to mount a disk image (with the game files) and ummount on quit?
|
Well the first thing I'd try is setting up a batch file to do this which your game shortcut would call instead of the actually game executable (which we'll call 'mygame.exe'). Something like this may work;
Code:
@echo off
start profile1.lnk
GameLoader -k "\path\mygame.exe"
start profile2.lnk
The thing about this is the timing. The first 'start' call will of course execute before media center is shutdown, which may or may not be what you're after. The second 'start' call, again, will execute
after ehshell.exe has been started.
One point to make about reinstating ehshell though, the GameLoader uses an asynchronous call to 'ShellExecute' to do this. For the non-coders, this means as soon as the call has been made into the operating system to start the process, it will return, before it has actually completed loading. So, depending on your system the batch file may actually get to 'start profile2.lnk' before ehshell.exe has finished starting up which may give the wrong results.
I suppose the best solution here would be to add some new params to GameLoader, where you could do something like:
Code:
GameLoader.exe -k -d -start "\path\pregame_load.bat" -end "\path\premce_restore.bat" "\path\mygame.exe"
Let me know how the batch file method goes before i start adding extra params to the GameLoader though. Thanks for all the comments guys
Cheers,
Nick