System Properties -> How to extract "User"

  • Thread starter Thread starter > Adrian
  • Start date Start date
A

> Adrian

System Properties show the User. I would like to be able to extract that
information in an application (not change it, only retrieve it). How can
that be done?

Thank you,
Adrian.
 
System Properties show the User. I would like to be able to extract that
information in an application (not change it, only retrieve it). How can
that be done?

Thank you,
Adrian.

I'm assuming you mean the name on the General tab of the system properties.

You can get it in this registry key

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion in the
value RegisteredOwner

This is NOT THE SAME value as the currently logged on user. That you would
get this way

System.Environment.UserName
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top