I need to disable and re-enable a hardware driver in a test script. This is to allow me to test an application's behavior when the hardware (a USB key in this particular case) is available or unavailable or becomes unavailable during normal operations. (I don't want to have to stand next to the machine and manually pull out the the usb device at the right time when I run the script :)
Does any monk out there know how this can be done inside a Perl script? I'm looking for a solution that works on modern Windows OS's (anything newer than NT), though a Linux/*nix solution would be of interest as well.
--DrWhy
"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."