Link to home
Start Free TrialLog in
Avatar of jjchua
jjchua

asked on

system data and time

Hi,

I had my privilege to change the computer's system time and date disabled.  How can I enable this privilege progammatically?  I tried to use AdjustTokenPrivileges
but it doesn't seem to work.

Thanks!

Avatar of Cynna
Cynna

jjchua,

> I had my privilege to change the computer's system time and date disabled.How can I enable this privilege progammatically?

You can't do this if admin disabled you to use those privileges.



> I tried to use AdjustTokenPrivileges...

AdjustTokenPrivileges enables the SE SYSTEMTIME NAME privilege (that allows the time to be set) for the calling process. It "activates" your sys time privilege, provided you have one to start with (which you don't).
Avatar of jjchua

ASKER

Hi Cynna,

Thanks for replying to my email.  Is there a way to add this privilege programmatically?  
ASKER CERTIFIED SOLUTION
Avatar of Cynna
Cynna

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
jjchua:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
jjchua,
No comment has been added lately (18 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Award points to Cynna http:#7126786

Please leave any comments here within 7 days.

-- Please DO NOT accept this comment as an answer ! --

Thanks,

anAKiN
EE Cleanup Volunteer