Link to home
Create AccountLog in
Avatar of crisbert
crisbert

asked on

setting time under NT from non Administrator Accounting

i need to set the sistem time without using NT Security (because my program will run on NT under non Admin login and it must have the possibility to set the system time!)

how can i do this?
and it's possible to do it?
(samples of source code are needed)

thanks

Cristian Bertoldi

i've posted the question under C section too. I will assign 500 points to the first correct answer.....
Avatar of jkr
jkr
Flag of Germany image

This is possible by using an account that holds the 'SeSystemtimePrivilege' - there is no need to have an admin login. This privilege is usually granted to Administrators and Power Users, but can also be granted to 'normal' users, but granting privileges indeed needs an admin account (e.g. your installation program could do it).

If you could go this way, I could offer some samples.

Another alternative would be to use a service that sets the time, but this is much more work...
Avatar of crisbert
crisbert

ASKER

ok , i'll try this way if you send me a sample...

thanks
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
This question is also asked at:

https://www.experts-exchange.com/jsp/qShow.jsp?ta=cprog&qid=10308047 

crisbert has said there that the option of changing user rights on the machine is not an option.  

An example to do this as a service is also included there.
Sorry, didn't pay attention to this Q in the C area...
thanks anyway, i'll use this sample code in another application....

if you have anything else......

Thanks
Cristian Bertoldi