Beispiel #1
0
        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 install = "Get-WindowsImage -Imagepath \"" + WindowsSetup.Variabile.locatie + "\" | Select-Object ImageName > Packages\\fix.txt ";

            CMD_Process_Class.Process_Powershell(install);
            string[] lines     = File.ReadAllLines("Packages\\fix.txt");
            var      lineCount = File.ReadAllLines("Packages\\fix.txt").Length;

            for (int i = 3; i < lineCount; i++)
            {
                if (lines[i].Length > 1)
                {
                    checkedListBox1.Items.Add(lines[i]);
                }
            }
        }
Beispiel #2
0
        private void metroButton2_Click(object sender, EventArgs e)
        {
            checkedListBox1.Items.Clear();
            string install = "Get-WindowsImage -Imagepath \"" + WindowsSetup.Variabile.locatie + "\" | Select-Object ImageName > Packages\\fix.txt ";

            CMD_Process_Class.Process_Powershell(install);
            string[] lines     = File.ReadAllLines("Packages\\fix.txt");
            var      lineCount = File.ReadAllLines("Packages\\fix.txt").Length;

            for (int i = 3; i < lineCount; i++)
            {
                if (lines[i].Length > 1)
                {
                    checkedListBox1.Items.Add(lines[i]);
                }
            }
        }