How can I disable Windows 11 Dynamic lock while running an attended automation?

Problem:

When running attended automation with Windows 11 Dynamic lock (Account > Sign-in options) enabled, the automation fails when the computer locks. This lock occurs because Dynamic lock feature uses Blue Tooth paired phone to detect when you leave the computer.

Question:
Is there a way to temporarily disable (perhaps using a setting in UiPath) or another way to temporarily disable the Windows 11 Dynamic lock feature and then re-enable this feature when the automation completes?

Solution:
I ended up adding a registry modification to programmatically disable and re-enable the Dynamic lock as shown in the following two PowerShell commands:

powershell -Command "Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon' -Name 'EnableGoodbye' -Value 0"
powershell -Command "Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon' -Name 'EnableGoodbye' -Value 1"

Feature Request:
I think it would be helpful to have a User Events activity to handle the Dynamic lock in a workflow, even though it may override associated security concerns!

Related:

There is a registry key that controls it.

https://answers.microsoft.com/en-us/windows/forum/all/dynamic-lock-allow-windows-to-automatically-lock/e1c21a56-f84b-4a80-a1fd-5e79793586ba

And you can use Powershell to edit it.

I am assuming since this particular key is in CURRENT_USER there won’t be any permissions issues with editing it.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.