Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# autostart automatically add application to startup folder

Tags:

c#

autostart

Is it possible that C# autostart automatically add application to startup folder. Now i can download and install C# application with autostart but application is not srated automatically when i restart windows. How to do that?

like image 787
senzacionale Avatar asked Dec 01 '25 21:12

senzacionale


1 Answers

You can use it :

RegistryKey rkey = 
    Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run");
rkey.SetValue("YourApplicationName", Application.ExecutablePath);
like image 174
Anand Avatar answered Dec 04 '25 09:12

Anand