Adding Application on windows start up
-
Hello, how can i add c# application on windows start up. i dont want to add in start up folder.Is there any othere way? like yahoo messanger which is not appeared:doh: in start up folder..
Put a value for it in one of the following folders. For All users:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
For the current users:HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
website // Project : AmmoITX //profile Another Post by NnamdiOnyeyiri
-
Put a value for it in one of the following folders. For All users:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
For the current users:HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
website // Project : AmmoITX //profile Another Post by NnamdiOnyeyiri
-
using Microsoft.Win32;
.....
RegistryKey hkcu = Registry.CurrentUser;
RegistryKey run = hkcu.OpenSubKey("Software\\Microsoft\\Windows\\CurrentUser\\Run");run.SetValue("MySoftware", "C:\\Path\\To\\Software.exe");
something like that should do the trick.
website // Project : AmmoITX //profile Another Post by NnamdiOnyeyiri
-
using Microsoft.Win32; string strAssemblyPath; strAssemblyPath = System.IO.Path.GetDirectoryName(base.Context.Parameters[ASSEMBLYPATH_STATENAME]); Process.Start(strAssemblyPath+"\\Application.exe"); RegistryKey MainKey; MainKey=Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths"); RegistryKey ApplicationKey=MainKey.OpenSubKey("Application",true); ApplicationKey.SetValue("Application.exe",strAssemblyPath+"\\Application.exe"); Check the Above code written in c#. This Code i have written for writting my application path into registry. And u can add the application to the Start up in another way also. Check while creating setup u can create a chort cut to the start menu startup folder. that will also run the application. Arun Kumar Sabat
-
using Microsoft.Win32; string strAssemblyPath; strAssemblyPath = System.IO.Path.GetDirectoryName(base.Context.Parameters[ASSEMBLYPATH_STATENAME]); Process.Start(strAssemblyPath+"\\Application.exe"); RegistryKey MainKey; MainKey=Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths"); RegistryKey ApplicationKey=MainKey.OpenSubKey("Application",true); ApplicationKey.SetValue("Application.exe",strAssemblyPath+"\\Application.exe"); Check the Above code written in c#. This Code i have written for writting my application path into registry. And u can add the application to the Start up in another way also. Check while creating setup u can create a chort cut to the start menu startup folder. that will also run the application. Arun Kumar Sabat