简体   繁体   English

通过Java Applet安装驱动程序

[英]Installing Drivers via a Java Applet

Just wondering if anyone has had any experience with installing hardware drivers via a Java Applet. 只是想知道是否有人有通过Java Applet安装硬件驱动程序的经验。 I'm currently writing an applet that will be accessing some hardware and will be embedded into a web page. 我目前正在编写一个将访问某些硬件的applet,它将嵌入到网页中。 In order to make things easier for end users I would like to have it detect if the drivers are installed and if not install them. 为了让最终用户更容易,我想让它检测是否安装了驱动程序,如果没有安装它们。

This will be a signed applet, so it should be able to access files and system information. 这将是一个签名的小程序,因此它应该能够访问文件和系统信息。 From what I understand, drivers are just a few system files being placed in the right spot with a few registry settings as well. 据我所知,驱动程序只是一些系统文件放在正确的位置,也有一些注册表设置。

Is this doable? 这可行吗? I can't find any info online about doing this. 我在网上找不到任何关于这样做的信息。

On windows I guess you could access the registry using the method described here (running the reg command). 在Windows上我猜你可以使用这里描述的方法访问注册表(运行reg命令)。

Another approach is this JNI registry interface . 另一种方法是这个JNI注册表接口

I'm not sure either is the easiest approach however. 但我不确定这是最简单的方法。 You could probably just try to load the relevant driver classes, and if that fails download a normal windows installer .msi or .exe to do the actual driver installation. 您可能只是尝试加载相关的驱动程序类,如果失败,请下载正常的Windows安装程序.msi或.exe来执行实际的驱动程序安装。 You can usually configure the installer to run 'silently' without user interaction, if absolutely necessary to hide it from the user. 您通常可以将安装程序配置为在没有用户交互的情况下“静默”运行,如果绝对有必要将其隐藏在用户之外。 That may be beside the point however, since it's likely that a new hardware driver will need to reboot Windows. 然而,这可能不是重点,因为新的硬件驱动程序可能需要重新启动Windows。

Another problem you will probably encounter is the most drivers will need administrator access to install them. 您可能遇到的另一个问题是大多数驱动程序需要管理员访问才能安装它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM