WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: tongelia on April 23, 2016, 12:23:01 AM

Title: date and time batch
Post by: tongelia on April 23, 2016, 12:23:01 AM
please, am need batch to disable date and time change option (prevent users to edit or change setting of date and time)
Title: Re: date and time batch
Post by: 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?)
Title: Re: date and time batch
Post by: tongelia on April 23, 2016, 06:22:46 AM
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
Title: Re: date and time batch
Post by: td on April 25, 2016, 06:47:31 AM
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.
Title: Re: date and time batch
Post by: td on April 25, 2016, 02:05:56 PM
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)