Skip to main content
Cadet | Tier 2
September 11, 2023
Question

How to get the value of Device-username via variable method in the bot script

  • September 11, 2023
  • 4 replies
  • 469 views

The value of device can be got by system variable $System:Machine$, but for username, what’s the variable name?

4 replies

Tamil Arasu10
Most Valuable Pathfinder
Most Valuable Pathfinder
September 11, 2023

Hi @Vicky1989 ,

Please use the below variable for get the system username,

$SystemVariablesPackage:UserName$

_Tamil_
Vicky1989Author
Cadet | Tier 2
September 11, 2023

 

it shown ‘invalid expresion’

September 11, 2023

Try using it like this

 

Vicky1989Author
Cadet | Tier 2
September 11, 2023

Try using it like this

 

this is the username that login in to control room and run bots, what I want to get is the username that login in to bot running device. now I have a better way to achieve it. Use action ‘System: Get environment variable’ and then assign to a custom variable.