Is there a way to run a .bat or .cmd when the screensaver starts? I've noticed some .exe can run if you rename them to .scr but is that it?
I'm sure there are many more such screensavers that will allow you to launch arbitrary programs/scripts. But what if you'd like to continue using your current screensaver? If so, see below for the solution (tested on Win7, should work fine on Vista+).
3. Using no 3rd party tools
If time is not terribly critical, then you could simply use the Task Scheduler's built-in Trigger "Begin the task: On Idle".
Next, go to the "Actions" tab and set the action to whatever it is you want to run.
This should execute the Action after the screensaver starts (or if the system goes idle without the screensaver), but there may be a 0-15 minute delay. Here is the relevant specifics from the Task Scheduler documentation:
So, your screensaver launches, and then 0-15 minutes later windows checks for idle and launches your program.