Folks-

I have an Lenovo (IBM) Thinkpad T60, containing (among other things) an internal wired ethernet interface. My power management is such that when this machine is powered up on battery, with no ethernet connection, the network adapter is not powered up. When this happens, the device does not appear in the device manager, and I cannot query it for its MAC address as described in WIN32: Permanent & Current MAC Addresses.

Taking the laptop off of battery signals power management to change its policy, and the device is automatically powered up, even when still disconnected from the network. However, I need to be able to query for the MAC address at any time the machine is available.

How can I use perl to tell this machine to power-up the device for me, so I can get the MAC address?

Thanks

-Craig


In reply to WIN32: How to power-up a device? by cmv

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.