Link to home
Start Free TrialLog in
Avatar of sonalchouhan
sonalchouhan

asked on

time

how do i restrict any user to change the system time

thanks
Avatar of sonalchouhan
sonalchouhan

ASKER

Adjusted points to 10
why would you want to?
If you are running NT then you can set policies to restrict access to such things, and / or implement a timeserver function from a server which cannot be changed by a normal user. This would have the added benefit of ensuring that multiple updates to a database are correctly timestamped across multiple pcs connecting to it.
It's impossible to stop the user from changing the time in a windows environment.  The Date and Time function are built into too many places...

The taskbar system clock, the control panel, and the Date and Time commands in DOS a window are internal to command.com....

Cheers!
Any particular reason for the rejection?

:-\
well i am making a project for a cybercafe now i hav ethe login time and the logout time which is the system time the diff is the time used so now anyone can change the system time and manupulate the time ussed soi i want that the user once logs in should not be allowed to change the system time

thanks please ans
ASKER CERTIFIED SOLUTION
Avatar of mcrider
mcrider

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
Or use the API GetTickCount(?) to figure out the length of time. It won't matter what the user does to the system time, the GetTickCount value can't be altered.
Either way is not foolproof... all you gotta do to mess it up is pull the power cord out of the wall...

Cheer!
True, but that's similar to a log-off. If the app checks for a valid log-off entry when it starts and doesn't find one, it can assume (and have a good chance of being right) that the power was killed abruptly, i.e. plug pulled/power switch flipped.

Later,
If you're tied into a LAN you should be able to get the time from the server and use that to sync the local clock. There are also web sites that give you the authorative time.

If you have an Oracle or other SQL server you can make data records using the SYSTIME value that will write the time based on the server clock.

M
That is sort of what I said only clearer!
Go to C:\Windows\System and find "TimeDate.cpl".  Rename this file and and the clock is 'disabled' (unless you specifically run the file that you renamed it to).  It's not foolproof, though.
i wnat that if my program is running then there should be nothing else on the desktop only my program no start button nothing is it possible

and once he exits out then all should appear

thanks
My answer... starting your program as the shell will accomplish this, however, you also need to look at:

HOWTO: Cover the Task Bar with a Window
http://support.microsoft.com/support/kb/articles/Q179/3/63.ASP 
 
HOWTO: Cover the Taskbar with a Window in Visual Basic
http://support.microsoft.com/support/kb/articles/Q197/5/85.ASP 
 


You need to start EXPLORER up before you terminate your program.


Cheers!