Auto Chekout for License Management in V8 XM

I am trying to find a way to auto checkout licenses when microstation starts and autoi checkin licenses when microstation closes.  Is there a script or variable or anything that can make this possible?  I would greatly appreciate any help with this.  Thanks.

Keith K.