def unistall_mdm2(self): a = tkMessageBox.askokcancel('提示', '确认卸载Mdm?') if a: if dirver().stopDrivers() == 0: if dirver().uninstallDriver() == 0: path1 = "Z:\\Program Files (x86)\\MDMTemp\\setup.ini" if os.path.exists(path1): os.remove(path1) else: pass shutil.copyfile(os.getcwd()+'\\release\\setup.ini', path1) # showinfo(title='提示', message="修改文件成功!") path = os.getcwd() s = threading.Thread(target=self.run2) s.start() else: showinfo(title='提示', message="卸载驱动失败!") else: showinfo(title='提示', message="停止驱动失败!") else: pass
def stop_file_protect(self): if dirver().disable_file_protect() == 0 : showinfo(title='提示', message="关闭文件保护成功!") else: showinfo(title='提示', message="关闭文件保护失败!")
def start_file_protect(self): if dirver().enable_file_protect() == 0: showinfo(title='提示', message="开启文件保护成功!") else: showinfo(title='提示', message="开启文件保护失败!")
def stop_driver(self): if dirver().stopDrivers() == 0: showinfo(title='提示', message="停止驱动成功!") else: showinfo(title='提示', message="停止驱动失败!")
def start_driver(self): if dirver().startDrivers() == 0: showinfo(title='提示', message="启动驱动成功!") else: showinfo(title='提示', message="启动驱动失败!")
def uninstall_driver(self): if dirver().uninstallDriver() == 0: showinfo(title='提示', message="卸载驱动成功!") else: showinfo(title='提示', message="卸载驱动失败!")