Unused NetBIOS sessions are disconnected after 15 minutes of inactivity.
If your program measures licenses by counting connections, you would want to end the session ASAP, or you may just want to free the resource. Unfortuneatly, there is no standard method.
You can use a batch file to initiate the NetBIOS session, run the program, and then terminate the NetBIOS session:
net use <drive:> \\computername\sharename
net use <drive:> /delete
NOTE: Sleep x (seconds) allows time for the program close to be committed.
NOTE: The server doesn't release the connection for an additional 255 seconds.