Automation with Windows Settings

I am working on an automation which involves activating Windows Settings program (as shown below).

The program works well in Studio as well as in Orchestrator when the Windows is not locked.

Whenever the Windows is locked, there is an error message below:

error

I suspect it may be related to the parameter of Input mode:

Inputmode

I have tried various available options but in vain. Any idea what is the correct way of programming it so that it is working even when the Windows is locked.

Thank you and look forward to the answers.

The correct way is by setting your unattended robot in Orchestrator to LoginToConsole set to False.

Change the input mode to SendWindowMessages or Simulate Type/Click to work in the Background.

In the robot machine use the cmd.exe and run logoff (this will Log out your robot not Disconnect ).

1 Like

Hi @marian.platonov ,

Thank you for the quick reply and advices.

What I want is to open Windows Settings and click “Time & Language”.

Firstly, I have set the robot in Orchestrator to LoginToConsole to False.

Secondly, I tried to use both (1) Simulate and (2) SendWindowMessages for the activities and found the following:

  • Simulate works for the “Use Application” activity but is not supported for the “click”.
    Screenshot 2023-02-06 at 8.45.38 PM

  • when I choose SendWindowMessage, the program is not running (without any error messages).

Looking forward to your further advice. Thanks.

  • when I choose SendWindowMessage, the program is not running (without any error messages).

What do you see in Event Viewer logs in the robot machine and in the logs of the respective job in Orchestrator UI?

Did you install the robot in User Mode or in Service Mode?

Are you using an Unattended runtime for your machine template?

I did this in the Studio and there is nothing shown in the Output panel.

Sorry, I am not too sure about the robot in User or Service Mode. How can I check this?

Yes, I am using Unattended robot on a machine template.

Sorry, I am not too sure about the robot in User or Service Mode. How can I check this?

Open UiPath Studio → Home → take a look on the left bottom coner

Are you referring to this one below?
Screenshot 2023-02-06 at 9.49.45 PM

Yes. So, you are using a Per-User installation (User mode). It will not work to schedule the job from Orchestrator for this robot type.

You need to install the robot in Service Mode.

Hi @marian.platonov ,

I am just wondering, when you say “not work to schedule the job from Orchestrator”, are you referring to the “Triggers” under Automation?

Actually, I am able to run such scheduled jobs from Orchestrator as shown below. But they are all basing on web browsers, not desktop Apps.

I have uploaded my program here and shall greatly appreciate if you could take a look/try from your end.

Main.xaml (22.1 KB)

Once again, thank you very much for your time and help.

Can you please explain how you are intending to handle Windows OS dektop Ui interactions from web browsers?

I don’t see any issues with the Main.xaml file. It extracts the local time zone.

  • If the user/robot (User Mode) will be logged in the Console session, the job can be run from Studio or Assistant only.

  • If the user/robot (Service Mode) will be logged in the Console session, the job can be run from Studio or Assistant only. If the user/robot (Service Mode) will be logged out the Console session, the job can be scheduled from Orchestrator and the execution will be performed in the Windows session 0.

More details here: Windows Sessions

Dear @marian.platonov ,

It seems that you misunderstood me. The automations shown in the screenshot of “Trigger” are all web browser based only and they are all working perfectly well even when the computer is locked. The activity option is “Simulate/Click”.

The one I am currently working on is of Windows desktop UI interactions which is giving me problem when the PC is locked.

Hope the above clarifies.

By the way, do you manage to run my program from Orchestrator when your PC is locked?

As I told you, you cannot run Ui Automation under a locked screen.

You need to install the robot in Unattended mode and then logout from the robot account and then trigger the job.

But I have totally no problems running those UI Automation under “Trigger” when the screen is locked.