I was on a Project where I needed to install Virtual Null Modems, since these weren’t physical devices PnP detection wouldn’t work…

I ended up writing this AutoIT Script to use the Add Hardware Wizard.

You are welcome to modify this script to suit your needs to install / configure Hardware.  I’m really starting to like AutoIT