I am creating wpf application using visual studio 2010 specifically for windows 7 operating system. Now I want my wpf app to start when ever computer starts. I googled it and wrote service but couldn't succeeded what I need. I do not know how to use that service properly or how to make one installer of both service project and wpf project ( I am new to wpf dev).
this is the code I found on msdn forum but do not know if I am using it right way - I think I am not giving right path of exe file
protected override void OnStart(string[] args)
{
ProcessStartInfo info = new ProcessStartInfo(@"C:\Users\Zeshan\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\TaskManagerPro");
info.CreateNoWindow = false;
Process p = new Process();
p.StartInfo = info;
p.Start();
}
Please guide me to the right direction and if possible kindly share some source code and also guide what is the best way to create installer.