Open the OSD as described earlier.
In the <DEPENDENCY> section below the <IMPLEMENTATION> section enter the following:
WAIT can be true or false depending on whether you want to launch to continue or wait for this item to complete.
<SCRIPT TIMING="PRE" EVENT="LAUNCH" WAIT="TRUE" PROTECT="TRUE">
<HREF>cmd.exe (or path to any other application)</HREF>
</SCRIPT>
< SCRIPT EVENT="SHUTDOWN"
TIMING="POST" WAIT="FALSE" PROTECT="FALSE"
EXTERN="TRUE"
>
< SCRIPTBODY>
net use
s:\\\\sgserver\\SoftGrid /DELETE
< /SCRIPTBODY >
< /SCRIPT >
TIMING can be PRE or POST of the EVENT
WAIT
PROTECT can be TRUE (inside the bubble) FALSE (outside the bubble)
http://www.tmurgent.com/OSD_Illustrated.aspx
Good scripting primer.....
http://blog.gridmetric.com/2011/10/05/osd-scripting-primer/
Also
sfttray /exe cmd.exe "<appname>"