Windows Logged-In User name in Windows Application

Posted on 2012-03-21
Medium Priority
Last Modified: 2012-08-13

I have a Windows-Application written in vb.net, how do I get the windows-authenticated logged-in user id?

I'm using vs2010
Question by:alfardan
LVL 17

Expert Comment

by:Chris Millard
ID: 37746614
LVL 20

Accepted Solution

BuggyCoder earned 2000 total points
ID: 37746628
LVL 17

Expert Comment

by:Chris Millard
ID: 37746637
From what I understand, the Environment.UserName doesn't work on non-domain operating systems
LVL 10

Expert Comment

ID: 37746646
"whoami" will return the currently logged in user -> this is from a command line. Will it help you to find a way to write your script?

Author Closing Comment

ID: 37746666
That's the answer that I wanted exactly, thank you

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
An ASP.NET Web Form User Control is not newly introduced in ASP.NET. In fact, it was an old technology yet still playing a role to generate web content, especially when we want to use it to have a better and easy way to control part of the web conte…
Watch the video of Kernel Migrator for SharePoint, which demonstrate the process easily of migration from SharePoint to SharePoint, OneDrive for Business & Google Drive servers, Public Folder to SharePoint, File Server to SharePoint. The tool has va…
In the video, one can understand the process of resizing images in single or bulk. Kernel Bulk Image Resizer is an easy to use tool for resizing large number of images. One can add and resize multiple images with this tool in single go. The video sh…

587 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question