Skip to main content
Question

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

  • September 11, 2023
  • 4 replies
  • 349 views

Forum|alt.badge.img+1

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
Forum|alt.badge.img+18
  • Most Valuable Pathfinder
  • September 11, 2023

Hi @Vicky1989 ,

Please use the below variable for get the system username,

$SystemVariablesPackage:UserName$


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • September 11, 2023

 

it shown ‘invalid expresion’


Try using it like this

 


Forum|alt.badge.img+1
  • Author
  • 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.