Hi LFC,
You're right, UEM does not support the substring operators from cmd.exe. It probably wouldn't help you even if it did, as the ViewClient_ variables are not yet available when UEM runs during logon.
Your best bet is probably to use that batch script, and put it in the startup folder (or use File Explorer's Run key to launch it).