I wanted a way to have some custom UI buttons to open directories in Zbrush and be more like the maya shelf for some macros. I was struggling to find the right format for ShellExecute command this is what finally worked:
// ZBrush macro [IButton, "???", "Opens the ZStartup > Macros folder in Windows Explorer", [ShellExecute, "explorer.exe C:\Program Files\Maxon ZBrush 2023\ZStartup\Macros\"] ,,,,"macros.psd"]
I placed the above macro txt file and the psd of the icon in a folder under macros:
C:\Program Files\Maxon ZBrush 2023\ZStartup\Macros\FLDR_CLKR
For simplicity everything can be held in the same folder. But in principle it will work for nested directories in more complex macros and plugins.
back in Zbrush press "Macros>Reload All Macros"
If the macro loads correctly your custom icon should appear. When you click on the icon it will open the macros folder. Very simple but a nice convenience and it gives me some ideas for more macros and icons.
All this info is out there online but I wanted to capture the basics for myself maybe it helps you too!