'scan for hardware changes' via NSIS?
got a bit of an odd report, but that's Windows and devices for ya...
Our installer currently (pre-)installs a hardware device driver through DPInst, simply to prevent any specific tweaks needing to be made through Windows versions, 32bit vs 64bit, and all that. This works very well, so no problems there.
Then a curious user decides to remove the installed hardware device from the Device Manager. No problem.. if the user wants to be silly, that's totally up to them.
But then when they re-install the hardware device driver through the installer, instead of DPInst installing, it performs a pre-install. After all, it thinks the hardware is gone (the user removed it from the device manager).
Now personally I think this is pretty much expected behavior if the user forces this, and if the user scans for hardware after installation, it will use the pre-installed package just dandy.
But from a user-friendliness point of view, the expected behavior probably -is- that the device becomes available again after driver package installation.
So to solve this, I have to force the equivalent of the Device Manager's "scan for hardware changes" functionality - preferably without opening the device manager console and sending a mouseclick to the button ;)
The 'scanHardware' configuration flag for DPInst sounded 100% promising but of course what it actually means is 'scan the currently recognized devices and only install the package if it is a better match than the current package installed for that device'.
Neither the InstDrv plug-in nor 'Driver installation and update' wiki topics seem to touch on device list refreshing.
Which leaves me with the maze that is MSDN, which tells me I should be running what is explained here...
http://support.microsoft.com/kb/259697
whose functions are described in Cfgmgr32.dll
...through the System plugin.
Would that be the appropriate route to take, or is there a more obvious method that I glossed over?