Real Time Shield File System Shield ignoring exclusions

I am experimenting with an autorun.inf file for a USB thumb drive. It runs exactly as intended until I add an additional shell command to add an option to the right-click context menu for the drive icon. The additional command enables the “Safely Remove” function to be launched directly from the context menu. The command executes: Rundll32 shell32.dll,Control_RunDLL HotPlug.dll.

As soon as I plug in the USB drive with the autorun.inf file containing this option, Avast jumps in, declares it malware and moves the whole file to the Vault.

I have tried to prevent Avast taking action by including in Real Time Shields > File System Shield > Expert Settings > Exclusions for Read/Write/Execute both all files on the USB drive (G:*) and just the specific file (G:\autorun.inf) but Avast simply ignores it.

What am I doing wrong?