[C#] Boot problem
- by Cecco
Hi guys,
I'm running on Windows 7 and I've a problem with my app at boot.
Within my app I use some threads and external dll (sqlite3.dll, etc...).
I've included these lines at first of my start.exe file:
RegistryKey rkApp = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
String p = System.Environment.CommandLine.Replace("vshost.","");
String pp = p.Remove(p.Length-1);
rkApp.SetValue("MyAPP", pp);
If I start my app manually from exe file (or with VisualStudio) works correctly.
If I start my app on reboot, MyApp crashes after few seconds.
Why I've this problem?