All, thanks for the suggestions.
I've worked around the problem by executing a .cmd file that contains the installation command line using %%^username%%
AgentSetup.exe /passive /norestart SettingsStoragePath=\\servername\share\%%^username%%
The installation does write the SettingStoragePath value to the registry (HKLM\SOFTWARE\Microsoft\UEV\Agent\Configuration) so I could have added another task to replace the value but it's not a good solution.
I will try the public variable approach, but for now the .cmd file method works.