From 3ca2557d4a153d4da0a4f774c29a5c7fa421fa93 Mon Sep 17 00:00:00 2001 From: Belim Date: Tue, 22 Oct 2024 12:46:54 +0200 Subject: [PATCH 1/2] Update NativePatcher.cs --- FlybyScript/Patcher/NativePatcher.cs | 82 +++++++++++++--------------- 1 file changed, 38 insertions(+), 44 deletions(-) diff --git a/FlybyScript/Patcher/NativePatcher.cs b/FlybyScript/Patcher/NativePatcher.cs index fd876a7..383d9a9 100644 --- a/FlybyScript/Patcher/NativePatcher.cs +++ b/FlybyScript/Patcher/NativePatcher.cs @@ -73,54 +73,48 @@ namespace FlybyScript } } - private async Task MountISO() +private async Task MountISO() +{ + try + { + + string isoFilePath = SelectISOFile(); + + if (!string.IsNullOrEmpty(isoFilePath)) { - try + MessageBox.Show($"Selected ISO file: {isoFilePath}. Now mounting the ISO.", "ISO Selected", MessageBoxButtons.OK, MessageBoxIcon.Information); + + _logger.Log($"Mounting ISO: {isoFilePath}...", System.Drawing.Color.Blue); + + string mountCommand = $"Mount-DiskImage -ImagePath \"{isoFilePath}\""; + await ExecutePowerShellCommand(mountCommand); // Run asynchronously for mounting + + // After mounting, try to get the drive letter + string mountedDriveLetter = await GetMountedDriveLetter(); + + if (string.IsNullOrEmpty(mountedDriveLetter)) { - OpenFileDialog openFileDialog = new OpenFileDialog - { - Title = "Select Windows 24H2 ISO File", - Filter = "ISO Files (*.iso)|*.iso|All Files (*.*)|*.*", - InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyComputer) - }; - - if (openFileDialog.ShowDialog() == DialogResult.OK) - { - string isoFilePath = openFileDialog.FileName; - - MessageBox.Show($"Selected ISO file: {isoFilePath}. Now mounting the ISO.", "ISO Selected", MessageBoxButtons.OK, MessageBoxIcon.Information); - - _logger.Log($"Mounting ISO: {isoFilePath}...", System.Drawing.Color.Blue); - - string mountCommand = $"Mount-DiskImage -ImagePath \"{isoFilePath}\""; - await ExecutePowerShellCommand(mountCommand); // Run asynchronously for mounting - - // After mounting, try to get the drive letter - string mountedDriveLetter = await GetMountedDriveLetter(); - - if (string.IsNullOrEmpty(mountedDriveLetter)) - { - _logger.Log("Failed to get mounted drive letter.", System.Drawing.Color.Crimson); - return null; - } - else - { - _logger.Log($"ISO mounted successfully. Drive letter: {mountedDriveLetter}", System.Drawing.Color.Green); - return mountedDriveLetter; // Return the mounted drive letter - } - } - else - { - _logger.Log("No ISO file selected.", System.Drawing.Color.Black); - return null; - } - } - catch (Exception ex) - { - _logger.Log($"Error mounting ISO: {ex.Message}", System.Drawing.Color.Crimson); + _logger.Log("Failed to get mounted drive letter.", System.Drawing.Color.Crimson); return null; } + else + { + _logger.Log($"ISO mounted successfully. Drive letter: {mountedDriveLetter}", System.Drawing.Color.Green); + return mountedDriveLetter; // Return the mounted drive letter + } } + else + { + _logger.Log("No ISO file selected.", System.Drawing.Color.Black); + return null; + } + } + catch (Exception ex) + { + _logger.Log($"Error mounting ISO: {ex.Message}", System.Drawing.Color.Crimson); + return null; + } +} private async Task RunSetup(string mountedDriveLetter) { @@ -342,4 +336,4 @@ namespace FlybyScript } } -} \ No newline at end of file +} From 45742ce546587588c9e0cfc2d9735caf2ec36c80 Mon Sep 17 00:00:00 2001 From: Belim Date: Tue, 22 Oct 2024 16:00:51 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cf30a2c..fd2c06c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Flyby11 (FlybyScript) +# Flyby11 (FlybyScript) Windows 11 for All – No Specs, No Problem! Flyby11 is a simple patcher that removes the annoying restrictions preventing you from installing Windows 11 (24H2) on unsupported hardware. Got an old PC? No TPM, Secure Boot, or your processor isn't supported? Flyby11 lets you install Windows 11 24H2 anyway. No complicated steps. Just run the tool, and you'll be running Windows 11 on your outdated machine in no time. Think of it as sneaking through the back door without anyone noticing.