auto start up appliction in for WM5

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi all i m asked to develop a application that will start atuomatically and
will be in memory and at specific time it will show up some messages,
basically it is appiontment schedular that will show time at specifc time.
in windows services are there which starts automatically and r continusoly
running in background or the simple application that make entry in register
"Run" key and starts automatically when computer starts.

How to develop such application for WM5 devices, is that possible or not.
any idea?
 
There are several different ways to accomplish this task.

1. Write a windows CE service. This is probably the most complex because
it will require you to write C Code.

2. You can specify an application to start on initialization by placing an
entry in the HK_LOCAL_MACHINE\\Init registry as a Launch## string value.
This can potentially start your application before a depending service starts.

3. Create a lnk file to your application and place it in the
\\Windows\\StartUp directory. This is probably the safest method and will
start your application after all other services are initialized.

Rick D.
Contractor
 
There's one other cavaet on #2. Managed code applications aren't a good
candidate for Init registry key insertion because the run-time needs some
services to be running before it can start, but it doesn't check for them
itself. So, you can easily end up with a program that will either generate
an exception in the startup code or just won't start, despite there not
really being anything wrong with it.

Paul T.
 
how to do option #3 using coding, most probly i will use C/C++ for that i
will not use managed code.
Thanks for you answer.
 
The easiest way is to create a Smart Device CAB Project in Visual Studio
2005. Just add the "Startup Folder" to the File System on Target machine tab
then create a shortcut to your application and put it in the Startup Folder.

The Smart Device CAB Project is pretty easy to figure out and will also
generate the CAB Wizard INF file if you want to fine tune it yourself
afterwards.
 
It's simply another thing that you need to be aware of, that may cause you
problems if you try to add a managed code application to the Init keys in
the registry. I've never gotten that to work reliably. If I need to start
a managed code application on startup, I would either put it or a shortcut
to it in the Startup folder or write a native code application to launch
from the Init key and have that wait until all of the services are up and
running before launching the managed applications that needs them.

Paul T.

Doug Bell said:
Paul is that different to what "dbgrick" wrote?

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:[email protected]...
There's one other cavaet on #2. Managed code applications aren't a good
candidate for Init registry key insertion because the run-time needs some
services to be running before it can start, but it doesn't check for them
itself. So, you can easily end up with a program that will either generate
an exception in the startup code or just won't start, despite there not
really being anything wrong with it.

Paul T.
 
Back
Top