sonminator
(Le Dinh Hoang Son)
August 28, 2019, 4:43am
1
I have encountered this problem for nearly 3 hours. Have been searching for all the possible solutions on various web pages but not working.
I need to find the login username of the current logging on user. It is the gray part of the below image
(レディンホアンソン)
This solution to this problem should be not dependent on the Windows version because my robot runs on many different types of Windows version ( > Windows 7 ), I think it should be command-line solution or vb.net code solution.
I have been searching for some solutions (vb.net + command line). But instead of my login username, it is the cC26038 OR MAIN.
Appreciate very much for any help. Thank you all
HareeshMR
(Hareesh Madasi)
August 28, 2019, 6:43am
2
Hae you tried this @sonminator
system.Environment.UserName
or
system.Environment.UserDomainName
Hi @sonminator
You can use Get Environment Variable activity to get the username of that machine
1 Like
sonminator
(Le Dinh Hoang Son)
August 28, 2019, 7:18am
4
I have tried them all. The result is cC26038 and MAIN
sonminator
(Le Dinh Hoang Son)
August 28, 2019, 7:20am
5
I’ve just tried. The result is still cC26038
HareeshMR
(Hareesh Madasi)
August 28, 2019, 7:38am
6
You need to write a piece of code to get the user display name. I don’t find any class or direct method to get that @sonminator
Try to google the same . you will get lot of solutions and even the code directly
1 Like
sonminator
(Le Dinh Hoang Son)
August 28, 2019, 7:42am
7
I have googled for 6 hours. Hope somebody has already encountered this problem unless it takes me more than 1 day to resolve this.
Natapong
(Natapong Raojutitam)
August 28, 2019, 8:02am
8
@sonminator
You need to invoke VB code to get name from registry
You can refer below workflow to get it
CheckNameFromRegistry.xaml (4.3 KB)
1 Like
sonminator
(Le Dinh Hoang Son)
August 28, 2019, 8:10am
9
You’re a genius. You saved my day ! . Appreciate very much
system
(system)
Closed
August 31, 2019, 8:10am
10
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.