Example:
Private Sub remKey(ByRef RegKey As String)
Try
Registry.LocalMachine.DeleteSubKey(RegKey, True)
Catch ex As Exception
End Try
If I run this as admin, it works with no problem using remKey("blahblah") The issue I'm having is I need to be able to remove registry keys from the CurrentUser section of the registry, I need to be able to get to their keys as well.
Every time I run it as admin, being that I'm remoted in to another computer it tries to view the currentuser for the admin profile currently in the registry.
Any thoughts?