I am trying to check if the current user is mapped to a network share that we are migrating away from so I can let them know via an HTA file popup that they need to log off and back on for the change to take. I am trying to only popup the message if they are still pointing their H: to the old server. I am having a hard time figuring it out. The users are currently mapped via a Kix script and then in a week from now will be VBS, in case that matter as to where to look. I tried the following but it cannot parse the expression. Any help would be appreciated.
if (exists key “Network” whose (exists key whose ((exists value “RemotePath” of it) of it) of (current user keys (logged on users) of registry)) whose (name of it as string as lowercase contains “\servername”)) of keys of key “Network” of (current user keys (logged on users) of registry) as string