There are Windows tools in place to do this so I just used <cfexecute> to call those. This way, from a Web page, we can fire up the necessary tools. Anyway, here we go...
To show the sessions:
<cfexecute name="c:\WINNT\system32\query.exe"
arguments="session"
variable="data"
timeout="10">
</cfexecute>
<cfoutput>
<cfdump var="#data#">
</cfoutput>
To disconnect the sessions (for this project I only had to disconnect two licenses so I disconnected them, if there are more, you will need to disconnect each on in the arguments of the <cfexecute> tag):
<cfexecute name="c:\WINNT\system32\tsdiscon.exe"
arguments="1"
timeout="10">
</cfexecute>
<cfexecute name="c:\WINNT\system32\tsdiscon.exe"
arguments="2"
timeout="10">
</cfexecute>
No comments:
Post a Comment