date and time batch

Started by tongelia, April 23, 2016, 12:23:01 AM

Previous topic - Next topic

tongelia

please, am need batch to disable date and time change option (prevent users to edit or change setting of date and time)

snowsnowsnow

Why?

(And what makes you think that WinBatch would be the appropriate tool for fulfilling your goal?)

tongelia

Quote from: snowsnowsnow on April 23, 2016, 06:00:34 AM
Why?

(And what makes you think that WinBatch would be the appropriate tool for fulfilling your goal?)
it useful for me because when I click to this batch prevent user to Modification to date and time )
I think you are able to implement this requirement

td

Too many variables here to give you a definitive answer but it is possible to block users and user groups from changing the system time by modifying the "Change system time" local or group policy on a system.   Another approach would be to create a background script that regularly checked the system time for unexpected values and adjust accordingly.   Of course the later approach would assume that a user can't or is not likely to simple kill the process.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

Making numerous assumptions, here is an untested example showing one approach:
Code (winbatch) Select
; Load
AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')

; Remove time set privs for group 'users' on the host 'server'.
wntPrivDel("\\server","server\users","SeSystemtimePrivilege",0)
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade