使用 Inno Setup 安装驱动程序

发布于 2024-09-15 06:39:38 字数 2179 浏览 1 评论 0原文

我正在 Inno Setup 中为我的应用程序创建设置,并且将来可能需要安装驱动程序。不过,我现在需要了解一些有关在 Inno Setup 中安装驱动程序的技巧,以便在需要时可以轻松地将驱动程序添加到安装程序中。


  1. 我应该强制用户仅将程序安装到 C:\Program Files\\ 中,还是没关系,我什至应该让他在 上安装它网络驱动器

  2. 我应该将驱动程序安装在 C:\Windows\ 中,以便随时可用(即使没有网络驱动器),还是也没有关系?

  3. 是否可以按需启动驱动程序?我想要发布程序的新版本,并且我需要创建设置这样就不需要重新启动 > 更新我的应用之后。那么是否可以关闭驱动程序,用新版本覆盖它,然后再次打开(就像使用服务一样)而无需重新启动 Windows?

  4. 是否可以如此轻松地覆盖驱动程序(如问题3中所述),或者建议始终完全卸载程序,然后再次安装新版本?

  5. 您能否提供一些您认为重要的关于安装/卸载/更新驱动程序的额外提示?我确信我错过了一些重要的要点。


我没有太多的驾驶经验和知识,所以对于有些困惑的问题我深表歉意。

什么样的驱动程序可能很重要,因此有一个相关的问题,应该回答这个问题: 低级鼠标挂钩和 DirectX

驱动程序开发资源

我发现了一些有用的链接关于驱动开发。以此作为参考。

CodeProject 的驱动程序开发 - 第 1 部分第 2 部分第 3 部分第 4 部分、第 5 部分第 6 部分
http://www.catch22.net/tuts/kernel1.asp 设备驱动程序简介
Windows 驱动程序开发教程

I'm creating setup for my application in Inno Setup, and I will probably need to install driver sometime in the future. However, I need to know some tips about installing drivers in Inno Setup now, so I can easily add the driver into the setup when it's needed.


  1. Should I force the user to install program only into C:\Program Files\<app>\, or it doesn't matter and I should let him install it even on network drive?

  2. Should I install the driver in C:\Windows\, to make it available anytime (even without network drive), or it doesn't matter as well?

  3. Is it possible to start driver on-demand? I want to release new versions of my program, and I need to create the setup so it doesn't require reboot after updating my app. So is it possible to shutdown the driver, overwrite it with new version, and turn on again (as you can with services) without restarting Windows?

  4. Is it possible to overwrite the driver so easily (as mentioned in question 3), or is it recommended to always fully uninstall the program, and then again install the new version?

  5. Could you please include some additional tips about installing/uninstalling/updating drivers you find important? I'm sure I've missed some important points.


I don't have much driver-experience nor knowledge, so I apologize for somewhat confused questions.

And it is probably important what kind of driver would it be, so there is a related question, which should answer that:
Low level mouse hook and DirectX

Driver Development Resources

I've found some helpful links regarding driver development. Use this as a reference.

Driver Development at CodeProject - Part 1, Part 2, Part 3, Part 4, Part 5, Part 6
http://www.catch22.net/tuts/kernel1.asp
Introduction to Device Drivers
Windows Driver Development Tutorial

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

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

发布评论

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

评论(1

你是我的挚爱i 2024-09-22 06:39:38

请不要这样做,在所有 HID 设备上安装上层过滤驱动程序是一个非常糟糕的主意。话虽这么说,我还是会回答你的问题。

  1. 当您安装驱动程序时,Windows 会管理驱动程序本身的放置位置(在 DriverStore 中),您不必担心这一点。

  2. 参见#1

  3. 对于某些驱动程序,是的。对于高于 HID 的过滤器驱动程序,否。您必须强制删除系统上的所有鼠标和键盘,然后重新添加它们(这对于 PS/2 设备来说是不可能的)。

  4. 是的,如果您正确设置了驱动程序版本并需要重新启动,则更新驱动程序相当容易。

再说一遍,虽然我不想让你泄气,但这样做只会让你自己陷入受伤的世界。

Please don't do this, installing an upper-level filter driver on all HID devices is an extraordinarily bad idea. That being said, I'll answer your questions anyways.

  1. When you install a driver, Windows manages where the driver itself gets put (in DriverStore), you don't worry about this.

  2. See #1

  3. For some drivers, yes. For a filter driver above HID, no. You'd have to force remove all mice and keyboards on their system and re-add them (which isn't possible with PS/2 devices).

  4. Yes, it's fairly easy to update a driver given that you correctly version it and require a reboot.

Once again, while I don't want to be discouraging, you're only going to get yourself in a world of hurt via doing this.

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