I am working on an OSD Task sequence which does BIOS updates. On these machines the BIOS updates fail if the notebook lid is closed. I wanted to find a programmatic way of determining if the lid is closed. I have found reference to a WMI event that one can monitor to detect lid changes (opening closing) but its not the change of state I want, I need to just check if it is currently closed. Anyone have a possible solution?
That's going to be entirely vendor-specific. The hardware itself, via a driver, would have to raise that information – and exactly how it does so may or may not use that WMI element. Your best bet would be to contact your hardware vendor.