Won't really help you as this registry will contain the name of the last logged-in user. It will not get removed if the user logs off. Therefore, you will also have to check whether HKEY_USERS contains the user's SID as an indicator that the user is actually logged in. Or you use the LoggedinUsers() UDF to cross-check the computers identified by your code.
_________________________
There are two types of vessels, submarines and targets.