Winbootmate Full !link! -

# Use diskpart + bootsect (common method) with tempfile.NamedTemporaryFile(mode='w', suffix='.txt', delete=False) as dp_script: dp_script.write(f"select volume {usb_drive[0]}\nclean\ncreate partition primary\nactive\nformat fs=ntfs quick\nassign letter={usb_drive[0]}\nexit\n") dp_script_path = dp_script.name

# Buttons frame btn_frame = tk.Frame(root) btn_frame.pack(pady=5) winbootmate full

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) # Use diskpart + bootsect (common method) with tempfile

def backup_bcd(self): backup_path = filedialog.asksaveasfilename(defaultextension=".bcd", filetypes=[("BCD files", "*.bcd")]) if backup_path: self.log(f"\n--- Backing up BCD to {backup_path} ---") # BCD store location (UEFI typically) bcd_path = r"C:\Boot\BCD" if not os.path.exists(bcd_path): bcd_path = r"C:\EFI\Microsoft\Boot\BCD" try: shutil.copy2(bcd_path, backup_path) self.log(f"✓ Backup saved to {backup_path}") except Exception as e: self.log(f"✗ Backup failed: {e}") text="1. View Boot Entries"

ISAHMED G.Hazel House, Rah Dhebai Magu, 20147,

K.Male, MV | [email protected] | +960 7354321