473,402 Members | 2,064 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,402 software developers and data experts.

How to get the Username of a running process??

Hi,

I know how to get the processes runging on a PC and information about them,
BUT:

How do get the username of that process? The same username that shows in
the Task manager list when you Cntrl+Alt+Del.

I tried the File Info Object, but didn't see any thing there.

I'm trying to check to to see if the same process is running on the same PC
under another user. Multiple processes are OKon same user, but not other
logins.
Nov 21 '05 #1
2 1328
Hi,

http://www.windowsformsdatagridhelp....8-a07917f8c3e4

Ken
----------------
"Randy Myers" <Ra*********@incjet.com> wrote in message
news:O5******************@TK2MSFTNGP14.phx.gbl...
Hi,

I know how to get the processes runging on a PC and information about them,
BUT:

How do get the username of that process? The same username that shows in
the Task manager list when you Cntrl+Alt+Del.

I tried the File Info Object, but didn't see any thing there.

I'm trying to check to to see if the same process is running on the same PC
under another user. Multiple processes are OKon same user, but not other
logins.

Nov 21 '05 #2
Thanks so much. You code works great and I understand it.

But where can I find information on WMI calls - like acceptable queryies and
the objects that can be queried? Also where can I find the calls like the
"GetOwner" you used?

I looked everywhere in Help and Object Browser.
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:Ot**************@TK2MSFTNGP10.phx.gbl...
Hi,

http://www.windowsformsdatagridhelp....8-a07917f8c3e4

Ken
----------------
"Randy Myers" <Ra*********@incjet.com> wrote in message
news:O5******************@TK2MSFTNGP14.phx.gbl...
Hi,

I know how to get the processes runging on a PC and information about
them,
BUT:

How do get the username of that process? The same username that shows in
the Task manager list when you Cntrl+Alt+Del.

I tried the File Info Object, but didn't see any thing there.

I'm trying to check to to see if the same process is running on the same
PC
under another user. Multiple processes are OKon same user, but not other
logins.

Nov 21 '05 #3

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

Similar topics

1
by: ChrisB4745 | last post by:
I'm working on a system service application that is supposed to report various information about the computer it is running on back to a central server. One of the things I need to know is the...
2
by: Mark | last post by:
In this article http://support.microsoft.com/?id=329290 I will have to perform this in my installation. The question is since the aspnet_setreg.exe does not automatically grant the asp.net service...
8
by: Jonathan Dixon | last post by:
I am developing an intranet and was wondering, when a user logs on is there a way to get the username of the windows account in asp.net. I have tried the following but they return the worker...
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...
0
by: Paul | last post by:
Hi, I'm trying to kick off the iiscnfg.vbs from a webservice to export a website's config to an xml file (And eventually populate other servers with the config). I initially tried this using the...
11
by: Kirk | last post by:
The following C# web service works fine until you uncomment the lines setting UserName and Password. Then the process starts as the specified user, but hangs in a suspended state. In fact, any...
0
by: Kirk | last post by:
The following C# web service works fine until you uncomment the lines setting UserName and Password. Then, Process.Start throws an Access is Denied Exception. This is with .NET 2.0, of course...
3
by: wizofaus | last post by:
I've now created the same setup on four different machines, where I'm changing the processModel section machine.config so that ASP.NET (1.1) runs as SYSTEM, to give it permission to do various...
6
by: tsmojver | last post by:
Does anyone know how to retreive the logon account username for a particular windows service? Or the current user that is running this service as a process. C# is the prefered language of choice. ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.