如何在Windows启动时运行C#应用程序?

我制作了一个在启动期间启动的应用程序,下面是下面的代码。

重新启动后,该进程将在进程管理器工具上运行,但是在屏幕上看不到该应用程序。当我从启动注册表值中打开相同的.exe文件时,程序运行完美。


// The path to the key where Windows looks for startup applications

RegistryKey rkApp = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);


// Add the value in the registry so that the application runs at startup

rkApp.SetValue("MyApp", Application.ExecutablePath.ToString());

我该如何解决?


斯蒂芬大帝
浏览 624回答 3
3回答
打开App,查看更多内容
随时随地看视频慕课网APP