C# autostart 自动将应用程序添加到启动文件夹

sen*_*ale 3 c# autostart

C# 自动启动是否有可能自动将应用程序添加到启动文件夹。现在我可以通过自动启动下载和安装 C# 应用程序,但是当我重新启动 Windows 时,应用程序不会自动分级。怎么做?

小智 6

你可以使用它:

RegistryKey rkey = 
    Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run");
rkey.SetValue("YourApplicationName", Application.ExecutablePath);
Run Code Online (Sandbox Code Playgroud)