Page 1 of 1

Mit der MSIX -Verpackung für Visual Studio schreibt App nicht in Registrierung

Posted: 08 Mar 2025, 16:37
by Anonymous
Ich habe eine App für Windows in C#erstellt, die automatisch startet, wenn Windows startet. private bool autorunProperty;
private readonly static string registryString = "Software\\Microsoft\\Windows\\CurrentVersion\\Run";
private void CheckRegistryKey()
{
using (RegistryKey key = Registry.CurrentUser.OpenSubKey(registryString, true))
{
if (key != null)
{
object value = key.GetValue(appName);

if (value != null)
{
autorunProperty = true;
}
else
{
autorunProperty = false;
}
}
key.Close();
}
}
< /code>
Es funktioniert perfekt: Lesen und Schreiben in der Registrierung.>