我制作了一个在启动时启动的应用程序,代码如下。
重启后,该进程会在进程管理器工具上运行,但我无法在屏幕上看到该应用程序。
当我从启动注册表值打开相同的.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());
我该怎么做才能修复它?
rkApp.SetValue
是否成功了? - Aliostad