mac_shinobi Posted October 6, 2009 Posted October 6, 2009 Appologies if this is in the wrong TA - Just curious as to how to make an ocx or dll ( which ever is relevant really ) so that I can execute power status querries via scripting ie vb scripts to querry whether a computer is battery powered or via AC Mains power and if battery how much charge / time it has left any links or some assistance, I mean I did find this from ms System Power Status (Windows) That explains which API's to use afaik but obviously trying to get the API's working in an ocx and then create the ocx and accessing these via a scripting language is a different ball game so require some help with it pls Thanks
ZeroHour Posted October 6, 2009 Posted October 6, 2009 Cant WMI do this? http://www.microsoft.com/technet/scriptcenter/resources/qanda/apr07/hey0409.mspx 1
mac_shinobi Posted October 6, 2009 Author Posted October 6, 2009 Yes and good to have that as one way to kill a bird figuratively speaking but would still be good to know how to do it via an ocx as seen it suggested that way a few times.
ZeroHour Posted October 6, 2009 Posted October 6, 2009 This may have an idea: Detect power status of laptop -- vb.net But yeh I know what you mean, its good to have extra options. You can also query the WMI directly from an app: WMI Made Easy For C# 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now