Well one problem I see at first glance....EXISTKEY() is kind of outdated that I know of. You should use KEYEXIST().

Also, I doubt this will work unless all your users have local admin rights. (Please tell me they don't.)