
Originally Posted by
Gatt
How do you do that!?
In a machine startup script:
Code:
if exist %windir%\ff_allow.cmd goto got_allow
echo cacls "c:\program files\mozilla firefox\firefox.exe" /e /g users:r > %windir%\ff_allow.cmd
at 15:00 /every:m,t,w,th,f %windir%\ff_allow.cmd
:got_allow
if exist %windir%\ff_deny.cmd goto end
echo cacls "c:\program files\mozilla firefox\firefox.exe" /e /r users: > %windir%\ff_deny.cmd
at 09:00 /every:m,t,w,th,f %windir%\ff_deny.cmd
:end
first chunk checks to see if the "allow" script exists; if not, it creates the script and schedules it at 15:00
second chunk checks for the "deny" script; if not, it creates it and schedules it for 09:00
It's not perfect - if the machine is switched off at 09:00 or 15:00 then it won't run. You could have a more complex script to run every time the machine starts up and checks the time and sets permission appropriately or you could just have a script which runs every 5 minutes and checks the time and sets perms.