473,387 Members | 1,876 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,387 software developers and data experts.

How to get all logged on user on a machine

Hi Gurus,
Is there any way to find out all the useres currently logged on my machine.
I am using framework 2.0 with VB.

I'll appreciate any help I get.
Thanks, Steven.
Mar 24 '08 #1
3 1743
On Mar 24, 7:40 pm, "Steven" <Ste...@nospaml.comwrote:
Hi Gurus,
Is there any way to find out all the useres currently logged on my machine.
I am using framework 2.0 with VB.

I'll appreciate any help I get.
Thanks, Steven.
What do you mean by logged on your machine? Logged on your LAN or
workgroup..?
Mar 24 '08 #2
Workgroups

Steven

"kimiraikkonen" <ki*************@gmail.comwrote in message
news:05**********************************@d4g2000p rg.googlegroups.com...
On Mar 24, 7:40 pm, "Steven" <Ste...@nospaml.comwrote:
>Hi Gurus,
Is there any way to find out all the useres currently logged on my
machine.
I am using framework 2.0 with VB.

I'll appreciate any help I get.
Thanks, Steven.

What do you mean by logged on your machine? Logged on your LAN or
workgroup..?

Mar 24 '08 #3
Norman Diamond responded with this to a very similar question on the C#
board. It should apply to VB as well.

================
There can be 0 or more current logged in users. If you want all of the 0 or
1 users who are currently logged in at the console then P/Invoke to
WTSGetActiveConsoleSessionId and WTSQuerySessionInformation. If you want
all of the users then you'll need to call WTSQuerySessionInformation in a
loop.

Warning: Only call the Unicode version of WTSQuerySessionInformation. If
your application runs in ANSI then explicitly call the Unicode version
WTSQuerySessionInformationW and convert the result to ANSI by calling
WideCharToMultiByte. From C# you mostly don't have to worry about this,
just make sure that your P/Invoke declaration specifies the Unicode version.
================

"Steven" wrote:
Hi Gurus,
Is there any way to find out all the useres currently logged on my machine.
I am using framework 2.0 with VB.

I'll appreciate any help I get.
Thanks, Steven.
Mar 25 '08 #4

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

Similar topics

15
by: Joshua Beall | last post by:
Hi All, What is the best way to use a cookie to remember a logged in user? Would you store the username and password in two separate cookies? Should the password be plain text? Hashed? Not...
4
by: Akhlaq Khan | last post by:
we are developing an intranet application (web based) which needs to detect the logged in user ID of the user hitting the website. the intranet is huge and based on win2k active directory (around...
6
by: John Dalberg | last post by:
I want to automate the process of logging into an intranet. I want to pull out the username of the Windows user logged into the machine running the browser and use the username in my app. How can I...
16
by: Jm | last post by:
Hi All Is it possible to determine who is logged onto a machine from inside a service using code in vb.net ? I have found some code that seems to work under vb6, but doesnt under .NET ? Any help...
4
by: Jarod_24 | last post by:
How do a windows-service detect whether a user is logged or not on a computer? So far i've found nothing in the windows api or any code examples that will allow me to figure this out. The...
4
by: Chumma Dede | last post by:
Hi, Is there any way in asp.net 1.1 to force a user to logout from an existing session on machine1, if that same userid logs in with a new session on another machine, say machine2? We are...
4
by: Rik Hemsley | last post by:
Hi, Our web application impersonates a domain user when it runs. Usually, the printers visible to the application are the same as those visible to the domain user. At one installation, the...
2
by: _thedebugger | last post by:
Dear friends, I am developing one shopping cart application. My requirement is if user logged in one machine, he should not logged into from another db. how should I do that. I am using sql...
8
by: simonlpwaters | last post by:
I need to obtain the username of the currently logged in user on a machine. However, the program that needs to do this will be running under different credentials to the logged in user, so using...
15
by: paul814 | last post by:
Is it possible to display the logged in user that is accessing the form, in a textbox? so say I have txtname I want to display the username of the person that is logged in to the PC in that...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
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...

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.