tk.Button(btn_frame, text="1. View Boot Entries", command=self.view_boot_entries, width=20).grid(row=0, column=0, padx=5, pady=5) tk.Button(btn_frame, text="2. Backup BCD", command=self.backup_bcd, width=20).grid(row=0, column=1, padx=5, pady=5) tk.Button(btn_frame, text="3. Restore BCD", command=self.restore_bcd, width=20).grid(row=0, column=2, padx=5, pady=5)
def run_admin_cmd(self, command, description=""): """Run a shell command that may need admin rights.""" try: self.log(f">>> {description or command}") result = subprocess.run(command, shell=True, capture_output=True, text=True) if result.returncode == 0: self.log("✓ Success") self.log(result.stdout) else: self.log("✗ Failed") self.log(result.stderr) return result except Exception as e: self.log(f"Error: {e}") return None winbootmate full
# Title title = tk.Label(root, text="WinBootMate", font=("Segoe UI", 16, "bold")) title.pack(pady=10) Restore BCD", command=self
tk.Button(btn_frame, text="4. Create Bootable USB", command=self.create_bootable_usb, width=20).grid(row=1, column=0, padx=5, pady=5) tk.Button(btn_frame, text="5. Fix Boot Errors", command=self.fix_boot_errors, width=20).grid(row=1, column=1, padx=5, pady=5) tk.Button(btn_frame, text="6. Rebuild BCD", command=self.rebuild_bcd, width=20).grid(row=1, column=2, padx=5, pady=5) Rebuild BCD", command=self
# Output area self.output = scrolledtext.ScrolledText(root, wrap=tk.WORD, height=20, font=("Consolas", 9)) self.output.pack(fill=tk.BOTH, expand=True, padx=10, pady=10)
# Buttons frame btn_frame = tk.Frame(root) btn_frame.pack(pady=5)