Are you sure that the account is disabled?

From the sounds of it you might not know what I meant by "and"ing. In case you're a little confused about that, here's how it works.

That number you see isn't used as a decimal number as you typed it. It's actually used as a binary number. Each binary digit is used as either ON(1) or OFF(0). Now each of those binary places can also be represented as a decimal number.

00000001=1
00000010=2
00000100=4
00001000=8
00010000=16
00100000=32
etc..

So... all of these numbers are represented as the UF_ constants. When you AND, you're checking if the bit represented in the UF_ variable is on.

If, for the account you're checking, the account is disabled, I'm guessing you have a problem someplace else.

Your other option is to use WMI. You can invoke it using Win32::OLE . Google for Win32_UserAccount and you should find some good information.


In reply to Re: Still wont work :( by rchiav
in thread Win32::Lanman::NetUserEnum ... FLAGS by Anonymous Monk

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.