I developed to my C# app a start up (means: that if the PC turned on the app will run), in Visual Studio. But if I turn on my PC, it will not show. I tiyed to see in the registry keys (press win + r , and type in regedit
, and paste the path ComputerHKEY_CURRENT_USERSOFTWAREMicrosoftWindowsCurrentVersionRun) and my app is still there. I also tried to create a new project and set it to the startup but it still the same, and I tried to see in the task manager the start up section and my app are still there so why it didn’t show when I start the PC.
This is the source code for the new project to test :
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace test
{
public partial class Form1 : Form
{
RegistryKey reg = Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true);
public Form1()
{
InitializeComponent();
reg.SetValue("MyApdp", Application.ExecutablePath.ToString());
}
}
}
Thanks a lot 🙂
I expect to see my app showing up at startup
1