private string GetRegistShellData(string RegistName) { try { string registData, SubregistData; RegistryKey hkml = Registry.LocalMachine; RegistryKey software = hkml.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", true); registData = software.GetValue(RegistName).ToString(); SubregistData = registData.Substring(0, 2); return SubregistData; } catch (Exception excp) { MessageBox.Show("GetRegistShellData错误" + excp.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning); } return ""; } /// //csharp/6275