"Set to Clipboard" activity failed command line execution by Task Scheduler on locked screen

Hi everyone!
I’m newbee using UiPath Studio Community Edition.
Last week, I had tested bellow things.
1.Very simple UiPath script using below activities
1)“Open Application” activity for cmd.exe
2)“Set To Clipboard” activity for clipping a command string
3)“Send Hotkey” activity for pasting the command string from the Clipbord
4)“Send Hotkey” activity for entring a enter key
5)“Close Application” activity for closing the opened cmd.exe
2.Using Winlows TaskScheduler for UiPath command line execution

If the screen is not locked on My PC, it works fine!
But if the screen is locked on My PC(type Win+l), on Step2 “Set To Clipboard”, it stopped the UiPath script.
On the UiPath execution log, there was a error message “Set To Clipboard: One or more errors occured”.
What’s wrong?
Please someone suggest me!

My testing Environment is bellow.
1)OS : Winlows 10 Pro
2)UiPath : Community Edition 2019.3.0
3)Sample UiPath Project (zip)
I use this project on “c:\Users\patent-atanaka\Documents\UiPath”
ClipboardTest.zip (10.3 KB)
4)Command line batch file for UiPath script (zip)
I use this batch file on “c:\batch”
Test_Clipboard.zip (418 バイト)
5)UiPath execution log files(not locked and locked)
executionlog.zip (1.4 KB)
6)Task Scheduler settings(zip)
TaskSchedulerSetting.zip (404.2 KB)


I guess you are using community edition and it won’t work when screen is locked. Make sure when you run the BOT screen did not get lock.

1 Like

Thank you for your reply! Lakshman.

1 Like

Hello patent-atanaka, have you solved the issue ? I am facing the exact issue, however I have already created a whole process that works on a locked screen using community edition, I dont think this is the problem

Whether solution found for this issue, I am facing similar issue

@Saravanan_Murugan , @Rasoul ,
Around this time, the boss of my company gave me the theme of automating command line-based system management tasks(AWS instances management). At this time, I wasn’t sure which activities were available when the screen was unlocked and when it was locked. For the time being, I performed PoC with the screen unlocked, created a prototype, evaluated it, and posted on this forum what to do with screen lock issues.
With @lakshman advice, I changed my approach and solved my issue.
First, I investigated that what activity the screen works with locked. Then I decided to prepare a separate batch file to execute the command and execute it in the Start Process activity.

Next, when the batch was executed, the command had some arguments, and this issue was solved by setting the environment variables of the batch by reading a text file.

in Japanese
エラー means ‘error’,
結果 means ‘result’.

Finally, we examined the method of judging the success or failure of the command execution result in the batch file. This outputs the standard output and standard error output of the command to a text file in the batch file, then uses the Monitor Events activity on the flow of UiPath to detect the standard output text file and judge the success or failure by the file size.

And notified the result by e-mail. We have created some automation flows based on this method and have been operating for about two years so far.I’m not a programmer, so it’s not a smart way, but if it helps you.