Letters by Time
1. Daytime
; USB drives from 8 to 12 and 13 to 18 o'clock at U:, no letter otherwise
[DriveLetters]
MinDaytime1=08:00
MaxDaytime1=12:00
MinDaytime2=13:00
MaxDaytime2=18:00
Letters=U
[DriveLetters11]
Letters=-
The time compare is implemented by text compare, so you have to note with two digits, e.g. 08:00, not 8:00. Furthermore a 24 hours notation is used, no am and pm!
2. Weekday
; USB drives from Monday to Friday at U:, no letter otherwise
[DriveLetters]
Weekdays=MO,TU,WE,TH,FR
Letters=U
[DriveLetters11]
Letters=-
The weekdays are noted with English two letter abbreviations: MO, TU, WE, TH, FR, SA, SU. Ranges as MO-FR are not implemented.
3. Time since a system event
Supported events:
Boot
UserLogon
UserLogoff
UserLock
UserUnlock
UserDisconnect
UserConnect
UserActivated
UserDeactivated
SleepRequest
Sleep
Resume
Dock
Undock
UndockRequest
UndockCanceled
Each one noted after a MinTimeSince or MaxTimeSince, e.g. MaxTimeSinceBoot and the time in milliseconds.
If an event hasn't been triggered so far then both, Min and MaxTimeSinceXxx give no hit, but on startup of the USBDLM service the times are initialized in a meaningful way, e.g. UserDock is initialized with 1 if the computers is docked on startup.
Sample: On start of the USBDLM service convert ramdisk drive R: into the NTFS file system, but only if less than one minute since the system started (otherwise USBDLM has probably been started manually, so converting again makes no sense):
[OnServiceStart]
MaxTimeSinceBoot=60000
open="%windir%\System32\convert.exe" R: /fs:ntfs
system=1
Sample: Start the Windows Calculator on Resume, but only if the Sleep event it at least one minute in the past (otherwise the computer probably woke up again immediately unintended):
[OnResume]
MinTimeSinceSleep=60000
open=calc