如何创建一个应用程序来跟踪使用PC的用户 [英] How to create an application to track user who use pc

查看:131
本文介绍了如何创建一个应用程序来跟踪使用PC的用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的先生/女士
我是开发人员.我想在Vb.net中创建一个应用程序,以在他们登录到PC时跟踪或观察用户的操作.我想跟踪应用程序的名称和打开时间.我该怎么办?我应该了解哪个课程才能实现该应用程序?

我要先谢谢你.

我期待着大家的到来

忠实地
Laing Moam

Dear sir/madam
I am a developer. I want to create an application in Vb.net to track or observe use''s action when they log in to pc. I want to track the name of application and time they opened. How i can do? Which Lesson should i know to achieve the application?

I would like to thank you in advance.

I look forward to here from all of you

Faithfully
Laing Moam

推荐答案

1.您需要首先获取当前登录的用户.您可以通过以下方式做到:

WindowsIdentity.GetCurrent().Name

2.您的应用程序与任务管理器密切相关.因此,了解任务管理器是如何工作的.还搜索使用C#或VB创建任务管理器的文章.这将帮助您让您的应用程序知道新的过程已开始.

3.完成此操作后,只需过滤掉当前用户启动的那些内容即可.我不确定这样做的托管方式.尽管advapi32.dll中有一个OpenProcessToken方法可以告诉启动它的用户名.

据我所知,Kernel32.dll也提供了提供许多与过程相关的信息的方法.阅读有关它.您可能会从中得到一些有用的信息.

希望这会有所帮助.
1. You need to get the current logged in user first. That you can do by:

WindowsIdentity.GetCurrent().Name

2. Your application closely relates to task manager. So read about how task manager works. Also search for articles where task manager is created using C# or VB. That will help you letting your application know that a new process was started.

3. Once you are done with this, just filter out those started by current user. I am not sure of managed way of doing this. Although there is a method OpenProcessToken in advapi32.dll that tells the name of user who started it.

From what I know, Kernel32.dll too offers methods that provide a lot of process related information. Read about it. You might get something useful out of it.

Hope this helps.


这篇关于如何创建一个应用程序来跟踪使用PC的用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆