private void Form12_Load(object sender, EventArgs e) { try { using (FileStream wimstream = new FileStream(WindowsSetup.Variabile.locatie, FileMode.Open, FileAccess.Read)) { WimFile x = new WimFile(wimstream); } } catch { } string dism = "dism /Get-WimInfo /WimFile:"; string install = "\"" + WindowsSetup.Variabile.locatie + "\" > Packages\\fix.txt"; string installing = dism + install; CMD_Process_Class.Process_CMD(installing); string[] lines = File.ReadAllLines("Packages\\fix.txt"); var lineCount = File.ReadAllLines("Packages\\fix.txt").Length; int i = 7, j = 1; for (i = 7; i < lineCount; i += 5) { string ep = lines[i]; string[] lines3 = ep.Split(':'); string gamma = lines[i + 2]; string lines2 = "Index " + j.ToString() + ":" + lines3[1] + " "; string[] lines1 = new String[] { lines2 }; string[] gamma_space = gamma.Split(':'); string comp = gamma_space[1]; lines2 += comp; string[] comp_sp = comp.Split(','); int space_nu = Int32.Parse(comp_sp[0]); WindowsSetup.Variabile.space_gb_ver = space_nu; checkedListBox1.Items.AddRange(lines1); if (i > lineCount) { break; } j++; } }
private void Conquer(string loading) { string dism = "Packages\\dism /export-image /SourceImageFile:" + "\"" + loading + "\"" + " /SourceIndex:" + WindowsSetup.Variabile.fix + " /DestinationImageFile:" + WindowsSetup.Variabile.format + "\\install.wim " + "/Compress:none /CheckIntegrity"; t2 = new Thread( () => { CMD_Process_Class.Process_CMD(dism, 1); Invoke(new Action(() => { t2.Abort(); })); } ); t2.IsBackground = true; while (t2.IsAlive) { Thread.Sleep(500); } t2.Start(); }
private void Imagex(string loading) { Thread t1 = new Thread( () => { string imagex = "Packages\\dism /Apply-Image /ImageFile:" + "\"" + loading + "\"" + " /index:" + WindowsSetup.Variabile.fix + " /ApplyDir:" + WindowsSetup.Variabile.format + "\\ > Packages\\temp.txt"; CMD_Process_Class.Process_CMD(imagex, 1); Invoke(new Action(() => { })); } ) { IsBackground = true }; t1.Start(); while (t1.IsAlive) { Thread.Sleep(500); Application.DoEvents(); } }
private void metroButton2_Click(object sender, EventArgs e) { string dism = "dism /Get-WimInfo /WimFile:"; string install = "\"" + WindowsSetup.Variabile.locatie + "\" > Packages\\fix.txt"; string installing = dism + install; CMD_Process_Class.Process_CMD(installing); while (!File.Exists("Packages\\fix.txt")) { Thread.Sleep(2000); } string[] lines = File.ReadAllLines("Packages\\fix.txt"); var lineCount = File.ReadAllLines("Packages\\fix.txt").Length; int i = 7, j = 1; for (i = 7; i < lineCount; i += 5) { string ep = lines[i]; string[] lines3 = ep.Split(':'); string gamma = lines[i + 2]; string lines2 = "Index " + j.ToString() + ":" + lines3[1] + " "; string[] lines1 = new String[] { lines2 }; string[] gamma_space = gamma.Split(':'); string comp = gamma_space[1]; lines2 += comp; string[] comp_sp = comp.Split(','); int space_nu = Int32.Parse(comp_sp[0]); WindowsSetup.Variabile.space_gb_ver = space_nu; checkedListBox1.Items.AddRange(lines1); if (i > lineCount) { break; } j++; } }
private void Bootsect() { string bootsect = "Packages\\bootsect /NT60 " + WindowsSetup.Variabile.format + " /force"; CMD_Process_Class.Process_CMD(bootsect); }
private void Conquer(string loading) { string dism = "Packages\\dism /export-image /SourceImageFile:" + "\"" + loading + "\"" + " /SourceIndex:" + WindowsSetup.Variabile.fix + " /DestinationImageFile:" + WindowsSetup.Variabile.format + "\\install.wim " + "/Compress:none / CheckIntegrity"; CMD_Process_Class.Process_CMD(dism); }