Event Logging
USBDLM can write service start/stop, drive arrival, removal and AutoRun events to the Windows application log.
[Settings]
EventLog=1
It writes then items like these:
USBDLM service started
Drive attached: Name='FUJITSU MHK2120AT USB Device' Type=FIXED MountPoint='Z:\' User=admin
Drive removed: Name='FUJITSU MHK2120AT USB Device' Type=FIXED MountPoint='Z:\' User=admin
Open executed: MountPoint=Z:\ CmdLine=C:\Windows\Systen32\cmd.exe /c C:\Backup1.cmd Z:\
USBDLM service shut down
Since V4.3 this can be configured using USBDLM variables.
Sample:
[Settings]
EventLogStringArrival=Drive attached: Name='%DevName%' Type=%DriveType% MountPoint=%Root% User=%UserName%
EventLogStringRemoval=Drive removed : Name='%DevName%' Type=%DriveType% MountPoint=%Root% User=%UserName%
EventLogStringOpen=Open executed: MountPoint=%Root% CmdLine=%CmdLine%
EventLogStringSvcStart=USBDLM service started
EventLogStringSvcStop=USBDLM service stopped
EventLogStringSvcShutdown=USBDLM service shut down
If an item is unwanted then set it like so:
EventLogStringOpen=-
Hint: While the Windows Event Viewer is open, the USBDLM.EXE cannot be deleted or replaced.
Since V5.2 USBDLM can write these lines to its log file with loglevel 0:
[Settings]
EventLog=2
If you want both then set EventLog=3