{
string path32 = @"Starter1.bat";
if (System.IO.File.Exists(path32))
{
OpenFileDialog openFile1 = new OpenFileDialog();
// Initialize the OpenFileDialog to look for text files:
openFile1.Filter = "Executable Files|*.exe";
openFile1.InitialDirectory = @"C:\";
openFile1.Title = "Select a Executable!";
openFile1.RestoreDirectory = false; //true;
if (openFile1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
FileInfo f = new FileInfo("Starter1.bat");
StreamWriter w = f.CreateText();
w.WriteLine("Start".Path);
w.Close();
}
}
else
{
System.Windows.Forms.MessageBox.Show("Can't Find \"Start1.bat\"!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}