unable to take screenshot unattended rpa

I used this guide to build a screen capture tool

This is run on rpa virtual machine unattended. While attended it will capture the screen at the correct times, but when it is unattended it returns

Error executing link in Automation: SGE_P_ScreenCap - From: SGE_P_ScreenCap.rectangleProxy1.Properties To: SGE_P_ScreenCap.graphicsProxy1.CopyFromScreen()

The handle is invalid

I assume this is because there is no screen on an unattended vm. Is there a way to generate a screen capture in this instance?

@DanQuinlog You’ll need to make sure the screen is unlocked and (of course) available. Using the RPA service will unlock your machine when it logs in, however you’ll need something to keep it unlocked for your run. Usually acting on the apps does it, but I have used a script before which you can find in the post below. You’d run that every few minutes to keep the session active.