How to disable changing the system date/time programmatically using VB

Does anyone know how to disable the user from changing the system's date and time.  I know it can be done via policy, but I can't use that in this situation.  My program applies different rights to the system in real-time when the user logs into my program (but all the while only 1 user is logging in to Windows).  I can control almost everything about the system, but this one user right is giving me trouble.  I know how to refresh the policy once the registry has been changed, but I can't figure out which registry entries to change and to what.  Any help would be appreciated.  Thanks.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Ummm.. Interesting one - can't track down the appropriate registry entries either.. but, a couple of ways would be;

1. Remove the Read permissions (or explicity deny access) for the user to the physical timedate.cpl applet itself using cacls.exe for instance.
2. Rename the file!!

hope that helps somewhat...
Have you check

run gpedit.msc

Local Computer Policy->Computer Configuraton->Windows Settings
->Security settings->local policies->user rights assignment

change the system time
codeconquerorAuthor Commented:
eddykt -> I know I can via gpedit, but I need to do this programatically and with only 1 windows user.  They log in to windows, open my program and log into my program.  When they log into my program, I setup their Windows user rights based on the settings the admin entered into my software (no desktop, no date/time change, no start button, etc...).

fostejo ->  I have tried to rename the file, but XP magically pulls it back.  I renamed it from TimeDate.cpl to and watched XP re-copy the file after about 20 seconds.

Anyone have any other ideas?
>>I renamed it from TimeDate.cpl to and watched XP re-copy the file after about 20 seconds.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
codeconquerorAuthor Commented:
errr, not so big a fan of that one Eddykt.  I did figure out the following though (from


[HKEY_CURRENT_USER\Control Panel\don't load]

By making these changes, and disabling access to the control panel (I already had that in the program), I got the effect I wanted.  I'll just make the Date/Time right a sub-right of access control panel.  Thanks for your help guys.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.