I have added the following code to my login script to prevent users from running certain applications during system maintenance hours. If the requirements are not met I don’t map certain drives and also remove certain application icons from the user’s Desktop, so that they don’t accidentally run certain applications during database re-indexing.
Does the logic make sense? For some strange reason on EOM processing nights Operations doesn’t get the correct drive mappings or the application icon if they login after mid-night.
Code:
$Exempt = "No"
If InGroup("Administrators", “Domain Admins", "Operations", 0)
$Exempt = "Yes"
EndIf
;
$LogonTime = @TIME
If $LogonTime > 06:30:00 And $LogonTime < 20:00:00 Or $Exempt = "Yes"
; Map drives
Else
; Don't map drive and remove icons from Desktop
EndIf