Diable sleep for specific programs [WIN]

When Cubase is running, Windows7 never sleeps, etc. it seems the power saving options are disabled. I like this and want Guitar Rig (standalone) to do it as well when it is running. I didn’t see any way in the Control Panel to tie the power saving options to specific programs. Anyone know how to do it?


[Mod edit: fixed broken links]

Thanks for the reply. This seems to describe how to write the functionality into the program (like Cubase must have done). I certainly don’t have the know-how to “insert” this function into the Guitar Rig program.
I guess I thought there would be a way to tell Windows (from the Control Panel, not from within the software code) not to sleep or turn off the display when a certain program is running.

That was my point exactly (should have included a smiley on my post). This behaviour must be programmed inside the program. As a user there nothing you can do, unless you find a third-party program which does something like:

  1. runs on the background and anytime it sees GuitarRig running turns off power saving
  2. turns off power saving functions, runs GuitarRig and turns them back on after GuitarRig has ended

Now after writing this answer, I realised it shouldn’t be too difficult to do it yourself:

  1. Set you PC into normal operation power scheme (on Control Panel)
  2. Run CMD and in command prompt type
    powercfg /getactivescheme
  3. write down the resulting GUID string (let’s call it GUID2)
  4. Set you PC into GuitarRig operation power scheme (on Control Panel)
  5. Run CMD and in command prompt type
    powercfg /getactivescheme
  6. write down the resulting GUID string (let’s call it GUID1)

Write a CMD script which uses POWERCFG

POWERCFG /setactivescheme GUID1
RUN_GUITAR_RIG (whatever command starts GuiotarRig)
POWERCFG /setactivescheme GUID2

More about powercfg: