none
Install a program in a WinCE image RRS feed

  • Question

  • Hi all,

    I am using an embedded with a WinCE image inside.

    Ineed to install a program in it and make to run when the board starts (i want to boot the program).

    The problem is that the programs don´t remains in the image when it turns off, there is a flash but i don´t know how to start the program in the image from the flash.

    i wouldn´t want to use the platform builder because i don´t know nothing about using it.

    Thank you in advance for any help.

    Monday, March 21, 2011 5:44 PM

Answers

  • Init key items start very early in the Windows CE launch process.  It is very possible that the attempt to launch the application precedes the mounting of the disk that holds it.  Further, since you're talking about a C# application, managed code applications require lots of the OS components to be up and running before they can launch.  So, you have two potential problems.  If you want to launch a C# program, I'd suggest that you put it in the Startup folder and forget about Init keys in the registry. The alternative is to write a C/C++ program, which can start before most of the OS is running, unlike C#, and have it wait for everything that the C# application needs.  When all of the dependencies are ready, the C/C++ application can launch the C# application.

    Paul T.

    • Marked as answer by Nosep Monday, July 18, 2011 6:47 AM
    Tuesday, May 31, 2011 4:38 PM
  • Hi Nosep,

    Please try this:

    1. Copy your HolaOtra2.exe into the your nand flash (assuming the folder is \\NAND ).

    2. Edit your project.reg with this entry:

    [HKEY_LOCAL_MACHINE\init]
         "Launch91"="\\NAND\\\HolaOtra2.exe"
         "Depend91"=hex:0A,00,14,00,1E,00,32,00

    3. From the build menu, select the "Copy Files to Release Directory"

    4. Then, Select "Make Run-Time Image".

    5. Now load the new NK.bin.


    Chris
    • Marked as answer by Nosep Monday, July 18, 2011 6:47 AM
    Friday, July 15, 2011 11:37 PM

All replies

  • Take a look at this http://geekswithblogs.net/BruceEitman/archive/2009/02/07/windows-ce-more-on-starting-an-application-when-the-device.aspx it includes links to other articles about starting applications when the system starts.  Depending on how the OS was configured by your vendor, one of them will probably work.
    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    • Proposed as answer by Michael Koster Tuesday, March 22, 2011 8:41 AM
    Monday, March 21, 2011 7:34 PM
    Moderator
  • Thank you very much Bruce for your answer, i am going to read it and i will post if i have troubles quickly.

    Thank you again.

    Tuesday, March 22, 2011 9:17 AM
  • Hi Bruce,

    I have read the links and i haven`t understand well. What i undestand i should do is:

    -Introduce the path in the program i want to be launch on system start.

    -Store it in the non-volatile flash (NAND in my case)

    -Execute the program

     

    After doing this, it is supposed that the program will start on the application begins?¿, I don´t think my reasoning to be ok.

    Sorry about my inexperience. I will restate my issue, maybe it would be more clear, what i need is to have a programm running on the WindowsCE image, and i need that if the system is restarted, on init this program have to be launch autommatically (in addition is needed by my application to have other programs preinstaled on the image to run, and when i install them and restart they dissapear).

    Sorry again about my lack of knowledges but i am lost.

    Thank you for any help

    Wednesday, March 23, 2011 11:06 AM
  • The trouble is that I know less about your embedded device than you do.  But I do understand what you want to do. 

    Your vendor should know a lot about your embedded device and should be able to help users to do what you want to do.  If they can't then you will need to choose a different device.

     


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Wednesday, March 23, 2011 11:46 AM
    Moderator
  • Hi Bruce,

    I have read the tutorials you have facilitated me (sorry for being so late), and i don´t understand it well.

    I have no windows/startup folder persistent, so i should try the option of the tutorial: http://geekswithblogs.net/BruceEitman/archive/2008/10/13/windows-ce-programmatically-setting-up-an-application-to-auto-start.aspx

    but i am lost, because i don´t know if i have to make a program with the method described and modified, or i should add it to the program i want to autostart. I have persistent NAND, should i store my program in there inside a folder? 

    As you can see i am very newbie with this issues. I am sorry about my unexperience but i need help desperatily.

    I would like to avoid the use of the platform builder because i don´t know notihing about it and the proccess of learning would increase the development time of my app.

    Thanks in advance for your help.

    Best regards.

    Tuesday, April 12, 2011 12:43 PM
  • Then it is time for you to ask your vendor.


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Tuesday, April 12, 2011 3:34 PM
    Moderator
  • Ok, I know that it is difficult to help me.

    Would you mind to give me some links for learning how to use BSP? 

    Thanks again.

    Tuesday, April 12, 2011 3:58 PM
  • Every single response I gave you included a link to my blog, start there.
    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Tuesday, April 12, 2011 4:00 PM
    Moderator
  • Hi again.

    I am understanding a little of this issues about embedded, Bruce in your blog yo say about two ways of init a program on the autostart. 

    I would like to know first, if I modify the winReg (HKEY_LOCAL...) i want to know which one in the BSP tree i have to modify to include my program, because the rest would be to create a new key (Launch50="nameOfMyProgram.exe") right?

    The other way was by modifying the path in the aautostart function, but i would like to know where in the tree is this file to modify it.

    Thanks for the help and sorry about inexperience.

    Friday, May 27, 2011 8:14 AM
  • You would modify the BSP tree that you are using, I don't know what you are using.  You could also modify your project.reg (or OSDesign.reg if you are working with Compact 7).

    I don't think that I said anything about modifying th autostart function (although I do present code to detect new disks and start exes), I think that I said put your exe in the Startup folder.  To copy your exe or lnk file to the Startup folder you would modify your DAT file.


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Friday, May 27, 2011 12:27 PM
    Moderator
  • Thanks for your reply Bruce.

    I have added in the subprojects directory my project (the one i want to autostart when the system do), in this program i have acceed to the .reg file and to the hkey_local_machine folder. There i have created the init folder and inside i have created both, launch52 and depend52 (the number i don´t know exactly why i have put that, it was free), in the launch i have assigned the name of the program.exe and in the depend=14 00 (i don´t know why i have choosen the shell dependence but.. :S). And it doesn´t start my program.

    Could you tell me what i´m doing bad (I suppose that many things :P).

    Thank you again and sorry my unexperience.

    Friday, May 27, 2011 1:34 PM
  • Find your changes in the _FLATRELEASEDIR\ce.bib and reginit.ini and respond with just your changes that you find in those files.
    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Friday, May 27, 2011 2:00 PM
    Moderator
  • Hi bruce,

    I suppose that you refer to the changes between the images without change the init keys ant the one without changes isn´t it?

    Now i am rebuiñding the image without any changes, when it be done i will post changes if a i find them.

    Other issue i have is a problem with the installation of CF3.5, it gives me errors and doesn´t install well.

     

    Monday, May 30, 2011 8:28 AM
  • Hi bruce, before telling diferences in that files, i would like to ask you if a subproject (project of the subproject folder) of the style typical Windows CE App is possible to run on the init by modifying init keys?

    Thanks in advance.

    Monday, May 30, 2011 11:54 AM
  • Hi, the changes in the reginit between the version without keys in the hkey../Init and the one that has them are only this:

    [HKEY_LOCAL_MACHINE\Init]

    "Launch54"="HolaOtra2.exe"

    [HKEY_LOCAL_MACHINE\Init]

    "Depend54"=hex:1e,00

     

    The one with keys has this at the end of the file and the other doesn´t.

    It tells something wrong?

    I`m going to compare the ce.bib

    Thanks

    Monday, May 30, 2011 12:56 PM
  • Hi again, i have yet compare the ce.bib and the only difference is the line in which the program (added to the subprojects folder) is executed.

    This is what appears in the file: HolaOtra2.exe  C:\WINCE600\OSDesigns\bsp2\RelDir\MSC_EXM_IMX35_ARMV4I_Release\HolaOtra2.exe

    Is there something wrong?

    Thanks in advance for any help

    Monday, May 30, 2011 2:47 PM
  • Hi, sorry about writting so quickly, is because i am advancing, Now I have succeed in starting an app on the startup, a simple WindowsCE Hello World. Now I have tried to write in the launch data the path to a program stored in nand flash, that is persistent in my WinCE, but it doesn´t make nothing, what i have to do to make run a program in the nand flash since the HKEYLOCAL... registry.

    Other way would be being able to add my C# application as a subproject, that i don´t now how to do it.

    Monday, May 30, 2011 4:21 PM
  • Init key items start very early in the Windows CE launch process.  It is very possible that the attempt to launch the application precedes the mounting of the disk that holds it.  Further, since you're talking about a C# application, managed code applications require lots of the OS components to be up and running before they can launch.  So, you have two potential problems.  If you want to launch a C# program, I'd suggest that you put it in the Startup folder and forget about Init keys in the registry. The alternative is to write a C/C++ program, which can start before most of the OS is running, unlike C#, and have it wait for everything that the C# application needs.  When all of the dependencies are ready, the C/C++ application can launch the C# application.

    Paul T.

    • Marked as answer by Nosep Monday, July 18, 2011 6:47 AM
    Tuesday, May 31, 2011 4:38 PM
  • Hi Nosep,

    Please try this:

    1. Copy your HolaOtra2.exe into the your nand flash (assuming the folder is \\NAND ).

    2. Edit your project.reg with this entry:

    [HKEY_LOCAL_MACHINE\init]
         "Launch91"="\\NAND\\\HolaOtra2.exe"
         "Depend91"=hex:0A,00,14,00,1E,00,32,00

    3. From the build menu, select the "Copy Files to Release Directory"

    4. Then, Select "Make Run-Time Image".

    5. Now load the new NK.bin.


    Chris
    • Marked as answer by Nosep Monday, July 18, 2011 6:47 AM
    Friday, July 15, 2011 11:37 PM
  • Hi Chris,

    Thanks for your help, i have succeed in this respect using the Launch64, and it runs Ok by now.

    But if it doesn´t in the future i will try this way.

    Thanks for your help again.

    Monday, July 18, 2011 6:46 AM