refs #1093 RegistryLib library is added
parent
6bc47bb157
commit
385ddb6ac1
|
@ -10,6 +10,7 @@ import shutil
|
|||
import SystemLib
|
||||
import FileSystemLib
|
||||
import ogGlobals
|
||||
import RegistryLib
|
||||
|
||||
MSG_HARDWAREINVENTORY = "Inventario de hardware de la máquina"
|
||||
|
||||
|
@ -42,7 +43,11 @@ def ogGetOsUuid():
|
|||
|
||||
# Error si no se reciben 2 parametros.
|
||||
if len(sys.argv) != 3:
|
||||
SystemLib.ogRaiseError(OG_ERR_FORMAT)
|
||||
SystemLib.ogRaiseError(
|
||||
"session",
|
||||
ogGlobals.OG_ERR_FORMAT,
|
||||
f"Error: {sys.argv[0]} need 2 arguments.",
|
||||
)
|
||||
return
|
||||
|
||||
# Montar la particion, si no lo estaba previamente.
|
||||
|
@ -58,7 +63,7 @@ def ogGetOsUuid():
|
|||
print(uuid)
|
||||
elif os_type == "Windows":
|
||||
# Leer identificador en clave de registro.
|
||||
uuid = Registry.ogGetRegistryValue(MNTDIR, "SOFTWARE", "\\Microsoft\\Cryptography\\MachineGuid")
|
||||
uuid = RegistryLib.ogGetRegistryValue(MNTDIR, "SOFTWARE", "\\Microsoft\\Cryptography\\MachineGuid")
|
||||
print(uuid)
|
||||
|
||||
def ogGetSerialNumber():
|
||||
|
|
Loading…
Reference in New Issue