How can i run my PDA application automatically after OS starts?
Thank you.
1. Create shortcut to your application in \Windows\Startup:
SHCreateShortcut(@"\Windows\StartUp\" +
Path.GetFileNameWithoutExtension(applicationPath) + ".lnk", "\"" +
applicationPath + "\"");
...
[DllImport("coredll.dll", EntryPoint="SHCreateShortcut") ]
private static extern bool SHCreateShortcut(string shortcut, string target);
2. Add key to HKLM\Init:
http://www.opennetcf.org/SourceBrowse/view.aspx?f=d:/sites/OpenNETCF/InetPub/wwwroot/Source/OpenNETCF/Win32/Registry.cs
3. Use P/Invoke CeRunAppAtEvent (Wakeup = 0x0B)
Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com