Here’s something stupid: using my Rumblepad doesn’t keep my monitors from going into standby. Playing old PlayStation games on ePSXe actually required me to move the mouse or hit the keyboard every so often which started to seriously piss me off after a while. A way to solve this once and for all was needed!
Manually disabling and re-enabling standby was for obvious reasons not an option, I had to find a way to automate this. Windows’ power management supports different Power Schemes, so the idea was to just switch to a different one while ePSXe was running.
The first thing thing that needed to be done was to create a new profile with my desired settings, i.e with the monitors’ standby set to Never. Apparently that can’t be done using the GUI (at least under XP, my 2003 Server has that feature), but a little research lead me to powercfg which does the job, albeit via the command line:
> powercfg /create "NoMonitorStandby"
That profile can then be edited with the standard GUI or you can do that from the console as well while you’re at it:
> powercfg /change "NoMonitorStandby" /monitor-timeout-dc 0
You can of course just skip this whole part and use the provided Always On scheme if that works for you.
Once that’s taken care of, keeping the monitor from going into standby is simply a matter of switching to a different power profile, running the program, and then switching back using a batch file:
> powercfg /setactive "NoMonitorStandby" > epsxe.exe > powercfg /setactive "Home/Office Desk"
Unfortunately, powercfg requires elevated privileges. In other words: the above script won’t work if you’re logged on with a restricted account (which you should be). There’s probably a Group Policy that handles this, but since the program I wanted to run required Administrator privileges anyway I didn’t bother looking into it. I’m just a lazy fucker like that.
Anyway, as it turns out you can’t use your trusted old runas to start a batch file with elevated privileges (and I assume there is a good reason for this). But not to worry, CPAU is your friend. It’s a tiny, simple runas replacement that even allows you to pass the password along to the command line so you don’t have to type it in every time. It goes without saying that this should not be done in our case since we’re using the Administrator account. Storing a plain text password in an unencrypted text file is a bad idea™.
Assuming our profile-switcher is called epsxe.bat, all you have to do now is call CPAU with the appropriate parameters:
> cpau -u Administrator -ex epsxe.bat -wait -profile
The -profile option is crucial: if it is omitted the user profile is not loaded and the system won’t find our shiny new power scheme.
There are of course many other ways to go about this, the Windows Scripting Host comes to mind (and there are probably third party applications that can do the job as well). But I wanted something simple and lightweight, so that’s what I went with.
By the way, does anyone know if it is possible to set independent standby timeouts for different monitors and/or graphic adapters?



