PcExpert Posted November 3, 2007 Share Posted November 3, 2007 Hi all, I've made a script that will block MSN at 20:00 but how to stop a user from changing the time, because if a user sets the time one hour back, then the script will allow msn again. Thanks! Link to comment Share on other sites More sharing options...
Achilles Posted November 3, 2007 Share Posted November 3, 2007 (edited) While 1 If WinExists('Date and Time Properties') then WinClose('Date and Time Properties') EndIf Sleep(100) WEnd Edited November 3, 2007 by Piano_Man My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Achilles Posted November 3, 2007 Share Posted November 3, 2007 (edited) If WinExists('Date and Time Properties') then WinSetTrans('Date and Time Properties', '', 0) EndIfThis way is probably better EDIT: Now I can't figure out how to show it! (Well, other then writing a script to do it) Edited November 3, 2007 by Piano_Man My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
PcExpert Posted November 3, 2007 Author Share Posted November 3, 2007 (edited) Thanks! Is there also another way to do it. The way you mention works perfect, but if the user closes the program, then it wont check anymore. Is there maybe somethng in the registry that can be modified? Edited November 3, 2007 by PcExpert Link to comment Share on other sites More sharing options...
The Kandie Man Posted November 3, 2007 Share Posted November 3, 2007 (edited) Write a function that has the AutoIt application check the system time every minute. If the AutoIt application checks the time and finds that significantly more time than a minute has gone by or time has gone backwards, have the AutoIt application query a web server for the time and then have it set the system clock to that time. Then have it use the web server's time as the correct time. This will fix the time that the user set incorrectly and will prevent the AutoIt script from even using the system clock's time if it suspects it has been tampered with. Note: You could also have an intranet LAN server give the time if you are doing this for a business network. This is a complicated fix, but I am trying to make it fool proof. - The Kandie Man ;-) Edited November 3, 2007 by The Kandie Man "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted November 3, 2007 Share Posted November 3, 2007 (edited) You could also go to (not sure about english names) controlpanel>"administration tools">"local securityprinciple" and then you remove the rights to change the clock for everyone except the administrator (assuming the users aren't admins or know how to change it) Edited November 3, 2007 by TzarAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
The Kandie Man Posted November 3, 2007 Share Posted November 3, 2007 You could also go to (not sure about english names) controlpanel>"administration tools">"local securityprinciple" and then you remove the rights to change the clock for everyone except the administrator (assuming the users aren't admins or know how to change it)Yes, this is a way of doing it. Just did it myself and this is the exact process as stated by TzarAlkex with some addition:Go to Control Panel > "Administration Tools" > "Local Security Policy"Once there expand the "Local Policies" tree. Then select "User Rights Assignment" and look in the list view area for "Change the system time".- The Kandie Man ;-) "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now