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

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Mit der MSIX -Verpackung für Visual Studio schreibt App nicht in Registrierung

by Anonymous » 08 Mar 2025, 16:37

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.>

Top