如何用C#创建一个Windows启动时自动运行的控制台应用程序?我怎样才能以编程方式做到这一点。我尝试了这个......
RegistryKey rkApp =
Registry.LocalMachine.OpenSubKey
("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run ", true);
rkApp.SetValue("MyAPP", Assembly.GetExecutingAssembly().Location);
Run Code Online (Sandbox Code Playgroud)
但在当前上下文中找不到 SetValue 方法。