locked
auto start up application on WM5 RRS feed

  • Question

  • 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, 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?
    automatcally start up and running in background
    Friday, June 29, 2007 1:52 PM

Answers

  • Yes.  Make an application which does that and add shortcut to it to startup folder. You can also make a service for WM but that is more complicated and not need.

    Friday, June 29, 2007 4:18 PM
  • Using a shortcut in a start-up folder is highly recommended. Another possibility is to add full path to your application to registry, at this level:

     

    HKEY_LOCAL_MACHINE\Init
           
    Two values are needed:

    "LaunchXXX"="full_path_to_your_app.exe"
    "DependXXX"=hex:16,etc

     

    The depend key, as its name says, lists what applications your application is depending on. So, the OS will wait for these applications to be started first, and then your app shall be executed.

     

    This also requires that your application call back into OS by calling SignalStarted().

    Saturday, June 30, 2007 1:23 AM
  • Just be aware that on Windows Mobile 5 and newer devices the registry key 'HKEY_LOCAL_MACHINE\Init' is considered privileged.

     

    Depending on the  security configurartion on the device - only application signed with privileged cert are allowed to modify this key.

     

    References:

    http://msdn2.microsoft.com/en-us/library/Aa919335.aspx

    http://msdn2.microsoft.com/en-us/library/aa455835.aspx

    Wednesday, July 4, 2007 12:17 PM

All replies

  • Yes.  Make an application which does that and add shortcut to it to startup folder. You can also make a service for WM but that is more complicated and not need.

    Friday, June 29, 2007 4:18 PM
  • Using a shortcut in a start-up folder is highly recommended. Another possibility is to add full path to your application to registry, at this level:

     

    HKEY_LOCAL_MACHINE\Init
           
    Two values are needed:

    "LaunchXXX"="full_path_to_your_app.exe"
    "DependXXX"=hex:16,etc

     

    The depend key, as its name says, lists what applications your application is depending on. So, the OS will wait for these applications to be started first, and then your app shall be executed.

     

    This also requires that your application call back into OS by calling SignalStarted().

    Saturday, June 30, 2007 1:23 AM
  • Just be aware that on Windows Mobile 5 and newer devices the registry key 'HKEY_LOCAL_MACHINE\Init' is considered privileged.

     

    Depending on the  security configurartion on the device - only application signed with privileged cert are allowed to modify this key.

     

    References:

    http://msdn2.microsoft.com/en-us/library/Aa919335.aspx

    http://msdn2.microsoft.com/en-us/library/aa455835.aspx

    Wednesday, July 4, 2007 12:17 PM
  • Friday, November 28, 2008 12:52 PM
  • I think good solution is to use CeSetUserNotification to register application which will be run by system at the time you specified.

    Features:
    1. Device will be waked up, if it is sleep.
    So flow is:
    1. Add additional start param for application for example : -register.
    2. When application run with param -register, it does register system notification with the help of function CeSetUserNotification and then exit.
    3. You add shortcut to startup folder to run your application with param -register during OS startup. 
    4. Time is come
    5. System run your application with empty command params and it run in normal state.
    Note: Don't forget to remove system notification :-)

    P.S What do you think ? Smile
    Saturday, November 29, 2008 12:15 PM
  • I forget. This function only works on real devices and it does not work on emulator come with SDK
    Saturday, November 29, 2008 12:17 PM