def rebootMachine(self, waitSeconds=3): self._isRebootTriggered = True System.setRegistryValue(System.HKEY_LOCAL_MACHINE, "SOFTWARE\\opsi.org\\winst", "RebootRequested", 0) # Running in thread to avoid failure of reboot (device not ready) RebootThread().start()
def clearShutdownRequest(self): System.setRegistryValue(System.HKEY_LOCAL_MACHINE, "SOFTWARE\\opsi.org\\winst", "ShutdownRequested", 0)