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