GetRegistryHiveNameFromConst format registry.Key hive name as a string
(key registry.Key)
| 70 | |
| 71 | // GetRegistryHiveNameFromConst format registry.Key hive name as a string |
| 72 | func GetRegistryHiveNameFromConst(key registry.Key) string { |
| 73 | if key == registry.CLASSES_ROOT { |
| 74 | return "HKEY_CLASSES_ROOT" |
| 75 | } else if key == registry.CURRENT_CONFIG { |
| 76 | return "HKEY_CURRENT_CONFIG" |
| 77 | } else if key == registry.CURRENT_USER { |
| 78 | return "HKEY_CURRENT_USER" |
| 79 | } else if key == registry.USERS { |
| 80 | return "HKEY_USERS" |
| 81 | } else if key == registry.LOCAL_MACHINE { |
| 82 | return "HKEY_LOCAL_MACHINE" |
| 83 | } else { |
| 84 | return "" |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | // EnumRegHivePersistence parse the specified key and subkey and return all string key/value in a []RegistryValue |
| 89 | func EnumRegHivePersistence(key registry.Key, subkey string) (values []RegistryValue, err error) { |
no outgoing calls
no test coverage detected