473,406 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

System Properties -> How to extract "User"

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.
Dec 29 '06 #1
4 3461
System.Environment.UserName

--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"Adrian <" wrote:
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.
Dec 29 '06 #2
On Fri, 29 Dec 2006 22:34:29 +0100, Adrian < wrote:
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
--
Bits.Bytes
http://bytes.thinkersroom.com
Dec 29 '06 #3
Thank you, that is the information I was seeking.
Regards,
Adrian.
"Rad [Visual C# MVP]" <no****@nospam.comwrote in message
news:1d***************@thinkersroom.com...
On Fri, 29 Dec 2006 22:34:29 +0100, Adrian < wrote:
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
--
Bits.Bytes
http://bytes.thinkersroom.com

Dec 30 '06 #4
On Sat, 30 Dec 2006 13:07:25 +0100, Adrian < wrote:
Thank you, that is the information I was seeking.
Regards,
Adrian.
Anytime dude! Happy New Year!
--
Bits.Bytes
http://bytes.thinkersroom.com
Dec 30 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: sierrachang | last post by:
Why would one not want to sort records in a form using Form Properties > Datasheet View > Sort Ascending? It's the fastest way, isn't it?
0
by: | last post by:
Would I use the file system object to get the information Summary information for a file? When I right click a Word doc and go to Properties --> System Tab, there's information that I'd like to...
3
by: MikeM | last post by:
I've been trying to locate some property or method that will allow programmatic access to the "loginUrl" attribute in the web.config file in the <system.web> -> <authentication> element when the...
3
by: Chad Beckner | last post by:
I am starting to translate some code from ASP to ASP.NET (VB). I was able to query ADS to get a users groups that they belong to, and also query a group and get a list of users. However, I can't...
1
by: nicourjal | last post by:
is it possible to know user defined properties with python by dealing with an object or something
0
by: Steven Buroff | last post by:
I'd like to override some java system properties (and, if possible, add some others) so that they are changed for all executions of the JVM on my PC. Is there somewhere a properties file that I...
2
by: Tienchau2000 | last post by:
Can someone help me how to call the System Properties and get the information such as: Manufactured and supported by:" information? Please help me... Thank you in advance. TC
2
by: inspirer | last post by:
hi there first of all thanks 4 this helpfull forum i just have one question and i will be very thankful to get ur ansmwer back what are the common problems of system admin???????
5
by: Steven | last post by:
I have the following in my web.config: <system.web> <profile defaultProvider="MyASPSqlProfileProvider" enabled="true" > <properties> <add name="FirstName" defaultValue="" type="string"/> <add...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.