How to Create a Project run on Windows Startup using C#.Net
-
Hai Friends, I want to create a .net application that run on windows startup. How can i create that. Guide me with your Ideas. Thanks, Vasanth.A
-
Hai Friends, I want to create a .net application that run on windows startup. How can i create that. Guide me with your Ideas. Thanks, Vasanth.A
Create a new registry key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run and then add a new key-value (MyApp - C:\MyApp.exe)
using Microsoft.Win32;
private void CreateStartup() {
RegistryKey Key=Registry.LocalMachine.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
Key.SetValue("MyApp", Application.ExecutablePath);
} -
Create a new registry key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run and then add a new key-value (MyApp - C:\MyApp.exe)
using Microsoft.Win32;
private void CreateStartup() {
RegistryKey Key=Registry.LocalMachine.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
Key.SetValue("MyApp", Application.ExecutablePath);
}I think you can also try to create a scheduled task.
Share your experience with others Check my Blog...
-
I think you can also try to create a scheduled task.
Share your experience with others Check my Blog...
I don't think that will help, schedular task, actually invokes a task or a bartch on a redefined time, its not responsive to windows startup. Its better to to add the entry in registry.
-
I don't think that will help, schedular task, actually invokes a task or a bartch on a redefined time, its not responsive to windows startup. Its better to to add the entry in registry.
sounds good
Share your experience with others Check my Blog...