이것은 작동합니다.시작 프로그램을 나열하는 방법
소프트웨어 \ 마이크로 소프트 \ 윈도우 \ CurrentVersion \ 실행
RegistryKey HKCU = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Run");
foreach (string Programs in HKCU.GetValueNames())
{
string GetValue = HKCU.GetValue(Programs).ToString();
Console.WriteLine(getFilePath(GetValue)); //Environment.NewLine
}
HKCU.Close();
이없는 모든 시작 프로그램.
HKLM \ SOFTWARE \ 마이크로 소프트 \ 윈도우에서 모든 시작 프로그램 \ CurrentVersion을이 정책 \ Explorer를 \ 실행 \
RegistryKey key = Registry.LocalMachine.OpenSubKey("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run");
foreach (string Programs in key.GetValueNames())
{
string GetValue = key.GetValue(Programs).ToString();
Console.WriteLine(getFilePath(GetValue));
}
있습니다; 나는 관리자 권한을 가지고 있고, 32 비트 OS를 가지고 있으며 또한 내 앱 설정이다.
당신이지고있어 오류가 무엇입니까? – Shimrod
귀하의 질문은 무엇입니까? – Lazarus
두 번째 함수는 시작 프로그램을 나열하지 않습니다. "HKLM \\ Software \\ Microsoft \\ Windows \\ CurrentVersion \\ Policies \\ Explorer \\ Run" –