Launching application after USB-UIRT wake-up from S3

I configured my USBUIRT to wake up my PC from S3. However, I would like to be able to automatically launch Media Portal when I wake my PC using the USBUIRT.
Currently I do not run Media Portal all the time and I also keep my PC in S3 when not in use. I have a macro setup on my Harmony remote that sends an IR code which does one of the following depending on whether the PC is sleeping or not:
- If the PC is on, turns on Media Portal
- If the PC is sleeping (S3), wakes the PC using a USBUIRT wake up code. Then I manually have to launch Media Portal.
I would like to take this further by making sure that when I wake the PC using the USBUIRT Media Portal also gets launched. On MCE PCs the Start button on the remote not only wakes up the PC but also turns on the MCE application, and I'd like to emulate that functionality. How does MCE do it? Does the remote send another code to launch MCE after giving the PC enough time to wake up? I could do that but I'd prefer to just do everything with one code, since adding a delay ties up the remote and I have to keep it pointed the whole time, can't lower volume etc.
Note: I also use this PC for regular PC stuff, so I don't want to always launch Media Portal whenever I wake up from S3.
Currently I do not run Media Portal all the time and I also keep my PC in S3 when not in use. I have a macro setup on my Harmony remote that sends an IR code which does one of the following depending on whether the PC is sleeping or not:
- If the PC is on, turns on Media Portal
- If the PC is sleeping (S3), wakes the PC using a USBUIRT wake up code. Then I manually have to launch Media Portal.
I would like to take this further by making sure that when I wake the PC using the USBUIRT Media Portal also gets launched. On MCE PCs the Start button on the remote not only wakes up the PC but also turns on the MCE application, and I'd like to emulate that functionality. How does MCE do it? Does the remote send another code to launch MCE after giving the PC enough time to wake up? I could do that but I'd prefer to just do everything with one code, since adding a delay ties up the remote and I have to keep it pointed the whole time, can't lower volume etc.
Note: I also use this PC for regular PC stuff, so I don't want to always launch Media Portal whenever I wake up from S3.