所以我使用此代码添加Key registry
以在启动时自动打开我的应用程序:
Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
Assembly curAssembly = Assembly.GetExecutingAssembly();
key.SetValue(curAssembly.GetName().Name, curAssembly.Location);
所以现在我希望能够删除此选项,以便将其添加到m应用程序用户定义中,以便在类似的东西上搜索RemoveKey
。
有什么建议吗?