Mac
Recommend checking out the worklet catalog in console. Search for App Installer by Ben Rillie. That has proven to work really well with very little modification.
Windows
Head back over to the worklet catalog in console. Search for the word Install and most of the examples for Windows will give a lot of really good examples on what works.
Because Viscosity is using jrsoftware, you likely would have good luck with syntax from https://jrsoftware.org/ishelp/index.php?topic=setupcmdline
Start-Process ".\Viscosity Installer 1.10.2.exe" -ArgumentList "/VERYSILENT /SUPPRESSMSGBOXES /ALLUSERS" /LOG="C:\Windows\Temp\viscosity_installer.log /NORESTART"