在 Windows 中跟踪启动的应用程序 [英] Track started applications in Windows

查看:26
本文介绍了在 Windows 中跟踪启动的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试整合自助服务终端解决方案,让我们可以按小时向人们收取他们使用的应用程序的费用.因此,我们需要一种方法来确定应用程序何时启动、何时关闭并记录此信息以进行计费.我是一个相当有经验的 .NET 程序员,所以托管代码解决方案会很棒.我还稍微涉足了 Windows API,所以这也可能奏效.有什么想法吗?

We're trying to put together kiosk solution where we can charge people by hour for applications they use. As such, we need a way to figure out when an application is started, when it is closed and log this information for billing. I am a reasonably experienced .NET programmer so a managed code solution would be great. I have also dabbled in Windows API a little bit so that might work too. Any ideas out there?

推荐答案

这对于 WMI 调用来说已经足够简单了.实际上,您可以在应用程序启动时、关闭时、运行时长、使用的内存量等方面从操作系统捕获事件.

This is simple enough with WMI calls. You can actually catch events from the OS on when an app is started, when it's closed, how long it was running, how much memory it used, etc.

这里是监控进程创建、删除等的一个例子

Here is one example of monitoring process creating, deletion, etc.

http://weblogs.asp.net/whaggard/archive/2006/02/11/438006.aspx

这篇关于在 Windows 中跟踪启动的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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