private void B_Output_Click(object sender, EventArgs e) { string filepath; SaveFileDialog file = new SaveFileDialog(); file.Title = "Enter a file name"; file.Filter = "Regist(*.reg)|*.reg|All Files(*.*)|*.*"; if (file.ShowDialog() == DialogResult.OK) { filepath = file.FileName; GlobalValue.RegOutPut(filepath, "HKEY_CURRENT_USER\\SOFTWARE\\SiemensSimulator"); } }