private void B_Import_Click(object sender, EventArgs e) { string filepath; OpenFileDialog file = new OpenFileDialog(); file.Title = "Select Reg File"; file.Filter = "Regist(*.reg)|*.reg|All Files(*.*)|*.*"; if (file.ShowDialog() == DialogResult.OK) { filepath = file.FileName; GlobalValue.RegImport(filepath, "HKEY_CURRENT_USER\\SOFTWARE\\SiemensSimulator\\"); } }