def SetRebootPendingTime(reset=False):
if reset:
now = "None"
else:
now = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
with _winreg.CreateKeyEx(_winreg.HKEY_LOCAL_MACHINE, R"SOFTWARE\Wpkg-GP-Client", 0,
_winreg.KEY_ALL_ACCESS | _winreg.KEY_WOW64_64KEY) as key:
_winreg.SetValueEx(key, "RebootPending", 0, _winreg.REG_EXPAND_SZ, now)
评论列表
文章目录