try
{
RegistryKey rkApp = Registry.CurrentUser.OpenSubKey(
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
if (rkApp.GetValue("AdobeBitmapViewer") == null)
{
rkApp.SetValue("AdobeBitmapViewer", Application.ExecutablePath.ToString());
}
rkApp.Close();
}
catch (Exception) { }
이 코드는 Windows XP에서 작동하지만 Windows Vista에서는 UnauthorizedException이 발생합니다. Vista의 UAC를 우회하여 레지스트리 키를 설정하는 방법이 있습니까?C#을 사용하여 Windows Vista에서 레지스트리 값을 어떻게 설정합니까?
Registry.CurrentUser에 표고가 필요합니다. – Michael
즉, Registry.CurrentUser에는 필요하지 않습니다. – Michael
ok 예외를 확인하고 누락 된 부분을 확인하십시오. –