使用 VB.Net 的 Windows 设备驱动程序

发布于 2024-12-27 23:11:23 字数 287 浏览 5 评论 0原文

概述: 我正在使用 Visual Basic 2010 开发一些 Windows 服务,该服务部署在所有企业 PC 上以收集所有计算机设备 ID,并监视任何硬件更改,然后将这些 ID 和名称发送回数据库以作为任何未知设备的参考将来。

我的问题:我需要在此服务中实现一个新功能来收集机器设备驱动程序,对其进行压缩,然后将其作为两部分发送回数据库:首先,设备描述数据。二、压缩以后要用到的驱动文件。我搜索了很多次,但找不到任何有用的示例来收集这些驱动程序文件。那么我该怎么做呢?

Overview:
I'm working on some windows service using Visual Basic 2010, which deployed on all enterprise PCs to collect all machines devices Ids, and monitors any hardware change then send these IDs and names back to a database to be as a reference for any unknown device in the future.

My question: I need to implement a new function in this service to collect machines device drivers, compress it and then send it back to the database as two parts First, the device description data. Second, the compress driver files to be used later. I search many times but I could not reach out any useful example for collecting these driver files. so how can I do that?.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

此生挚爱伱 2025-01-03 23:11:23

我找到了一个读取设备 inf 文件以获取此 url 中的驱动程序文件包的解决方案: http ://archive.devx.com/dotnet/discussions/040902/cominterop.asp

I found a solution for reading devices inf files to get driver files bundle in this url: http://archive.devx.com/dotnet/discussions/040902/cominterop.asp

_失温 2025-01-03 23:11:23

尝试以下代码:

 For Each drive In Environment.GetLogicalDrives
            Dim Driver As DriveInfo = New DriveInfo(drive)

            If Driver.DriveType = DriveType.Removable Or Driver.DriveType = DriveType.Fixed Then

                ComboBox1.Items.Add(drive)
            End If
        Next

Try following code:

 For Each drive In Environment.GetLogicalDrives
            Dim Driver As DriveInfo = New DriveInfo(drive)

            If Driver.DriveType = DriveType.Removable Or Driver.DriveType = DriveType.Fixed Then

                ComboBox1.Items.Add(drive)
            End If
        Next
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文