How do you vbs or batch command to delete a registy key that has keys below it. I need to delete the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing but it might have 2-3 keys below it that need to be deleted with it. I have tried using the VBS script...
Set WshShell = CreateObject("WScript.Shell")
Set WshShell = Nothing
But it throws any error becuase I have to tell it to delete each subkey first. The keys might be different for each computer, so cannot script to delete the subkeys. How do I script or batch to delete the entire key with subkeys?