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

Ein Treffpunkt für C#-Programmierer
Anonymous
 Mit der MSIX -Verpackung für Visual Studio schreibt App nicht in Registrierung

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

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post