Note: This article now refers to version 1.3 of ReconnAct!, an update of the original version.
Dennis Damen, one of the two DADE Power Tools guys (see their other tools) and an employee of Login Consultants has created free utility called ReconnAct! that runs on a Terminal Server and creates two environment variables: CURRENT_CLIENTIP and CURRENT_CLIENTNAME. These variables are automatically updated when a user connects from a different client.
The best part is that you can also configure this tool to run a process (script, executable, etc.) whenever one of these parameters changes, so we finally have a way to update printer mappings when users log on from other workstations!
Version 1.2 introduces a the new ability to run a script on disconnect and/or disconnect! This means that we finally have a way to cleanly log users off after their idle time limit is reached!
Version 1.3 fixes some bugs and adds the ability to run a script that's hidden from the user.
To use this tool, you simply add a small 18kb executable called ReconnAct!.exe to the users' or servers' logon scripts.
I wish I had these five years ago! Download from the link on this page.