Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: wntUserSetDat Logon Hours
Example:
An account has all logon hours set to "deny" except Thursday, 12:00am to 5:00pm. When I get the "logon_hours" attribute using wntUserGetDat, I get:
000000000000000000000000C0FF7F000000000000Converted to binary, I get (without the line breaks of course):
000000000000000000000000 000000000000000000000000 000000000000000000000000 000000000000000000000000 110000001111111101111111 000000000000000000000000 000000000000000000000000Why are the 1s nonconsecutive? The logon hours are. I previously thought that it was a time zone matter, but there's no way to shift the bits around to make them contiguous. Help?
So take your binary representation...
000000000000000000000000 000000000000000000000000 000000000000000000000000 000000000000000000000000 110000001111111101111111 000000000000000000000000 000000000000000000000000write each group of 8 in reverse order
000000000000000000000000 000000000000000000000000 000000000000000000000000 000000000000000000000000 000000111111111111111110 000000000000000000000000 000000000000000000000000now they are contigious in this representation.
so umm that would be thurs GMT time 6AM to 11 PM so applying say a -6 bias that would be CST 12 PM to 5 PMThere is widespread confusion about what time 12AM is and what time 12 PM is
12:00 PM is midnight 12:00 AM is noon 12:01 AM is 1 sec past midnight 12:01 PM is 1 sec past noonHowever there are widespread variances to this in practice, so often you will see 12AM as midnight and 12PM as noon, confusing *everything*.
There is no need to really reverse it, just check the byte in the opposite order.
To "visualize" this, write the bytes (as is) down in reverse order.
Article ID: W15567
File Created: 2003:05:13:11:28:58
Last Updated: 2003:05:13:11:28:58