views:

63

answers:

1

Just wondering if anyone has had any experience with installing hardware drivers via a Java Applet. I'm currently writing an applet that will be accessing some hardware and will be embedded into a web page. 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.

+3  A: 

On windows I guess you could access the registry using the method described here (running the reg command).

Another approach is this JNI registry interface.

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. 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.

Another problem you will probably encounter is the most drivers will need administrator access to install them.

Mike Houston
Didn't think about the rebooting or admin privileges. Thanks for pointing those out. I personally just want to offer the MSI as a separate download and let the user do that their first time there than waste a ton of time developing, but ultimately its not my call... Perhaps I can talk the boss out of this idea ;)
Psilokan