ja, that UDF is sad show. it probably would be just some lines for this task if someone else would have written it
anyway, the WMI way I have partly generated. I was able to lock myself offline with this:
dunno what inparam property I should put there. anyway, my ironic note about the UDF (which you understood to point to registry stuff in it) was a pointer for you to try descripe a little more specific question