Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
End Users
Pocket PCActiveSyncMultimediaEBooksWirelessSmartPhones
Developers
Windows MobileSmartPhonesWinCE ProgrammingVB for WinCEVC++ for WinCEPlatform BuilderTest Tools
PocketPC DirectoryFree SoftwareWeb Resources
Related Topics
PalmMobile PhonesMore Topics ...

Pocket PC Forum / Developers / WinCE Programming / March 2010

Tip: Looking for answers? Try searching our database.

Updateing an autostart application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Martin M - 19 Mar 2010 14:44 GMT
Hello,

I have read that I have to include an autostart application in the build
process of the image. Now I would like to ask if there is a way to update
this program later once the image and the program is loaded to the target.
Especially this is interesting because I would like to have someone develop
an application with VS 2008 that does not have platform builder.
Is there a way?

Thank you for any answer

Martin
Luca Calligaris [eMVP] - 19 Mar 2010 17:22 GMT
There are different scenarios to consider: you can start the application
using the registry 'init' key rather than placing a shortcut in the StartUp
folder. In both cases it is not necessary to include the applciation in the
binary OS file: you can put it in some storage media 8SD, flash, ...) and
update it when you need it

Signature

Luca Calligaris (MVP-Windows Embedded)
l.calligaris.nospam@eurotech.it.nospam
www.eurotech.it

> Hello,
>
[quoted text clipped - 9 lines]
>
> Martin
Martin M - 20 Mar 2010 17:17 GMT
Hello Luca,

thank you for your answer.

> There are different scenarios to consider: you can start the application
> using the registry 'init' key rather than placing a shortcut in the StartUp
> folder.

Is one of these methods better for some reason than the other?

Thank you for any help

Martin
Bruce Eitman [eMVP] - 20 Mar 2010 18:43 GMT
The Startup folder is handled by Explorer.exe, so if it doesn't run - your
app won't run.  But if you are running Explorer.exe the Startup folder is
nice becuase most APIs will be ready before your app runs.

Signature

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

Eurotech Inc.
www.Eurotech.com

> Hello Luca,
>
[quoted text clipped - 10 lines]
>
> Martin
Dean Ramsier - 20 Mar 2010 21:55 GMT
Startup folder is also easier because it doesn't involve any registry
changes.  But if your app has to run before explorer for some reason then
you need to use the init key to cause your app to be launched.

Signature

Dean Ramsier - eMVP
BSQUARE Corporation

> The Startup folder is handled by Explorer.exe, so if it doesn't run - your
> app won't run.  But if you are running Explorer.exe the Startup folder is
[quoted text clipped - 14 lines]
>>
>> Martin
Martin M - 25 Mar 2010 17:43 GMT
Hello together,

my goal is to build a kiosk system without an explorer so I guess I have to
go for the registry entry.
What I don't understand at the moment is how to load the application update
to the flash file system controlled through the host PC. I can load it from
host to the Win CE system but then I need to copy it to flash disk on Win CE.
If I don't it will be lost at power down. This makes me think that everything
I see when browsing „My device“ except Flash disk resides in RAM and any
changes on these will not be permanent through power cycling, right ?
One idea I had is to load the flash partition with the program and other
files by using boot loader tools. But I guess this needs to also load a FAT
to that partition ??

Any help is welcome ( I guess you see that I am pretty new to Win CE. But
still enjoying it...)

Martin
Bruce Eitman [eMVP] - 25 Mar 2010 19:31 GMT
Martin:

The answer to you question about flash is "it depends"  You vendor should be
able to assist you either with manual or support.  There are variations in
how it would be implemented from device to device.

But, yes if files are lost after reset, then only the flash disk is
persistent.  Are registry changes persistent?  That is, if you changed
HKLM\Init would the change survive a reset?

Signature

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

Eurotech Inc.
www.Eurotech.com

> Hello together,
>
[quoted text clipped - 20 lines]
>
> Martin
Martin M - 26 Mar 2010 09:21 GMT
Hello Bruce,

> Are registry changes persistent?  That is, if you changed
> HKLM\Init would the change survive a reset?

I have a hive based registry and I can do a "save registry" with a tool
called regtool, I assume that this comes from the vendor of my board (Digi
CC9M2443). I found that then the entries are persistent. I don't know yet how
to change a registry key from the CE desktop.
I once created a link to an application on the CE desktop and that was gone
after a power cycle. Would this be stored in registry too?

I have read that I can add a key at HKEY_LOCAL_MACHINE\init\bootVars named
RegistryFlags and give it value 1 which would cause any change in registry
data to automatically be flushed to flash memory. In the registry of the
image that came with the board there is only a key named Flags that is set to
value 3 (In fact there are many entries double, one of type REG_NONE and one
of type REG_DWORD or REG_SZ. Where can I find out what that means?)

Thank you for any help

Martin
Paul G. Tobey [eMVP] - 26 Mar 2010 17:00 GMT
No, desktop items are stored in the filesystem, \windows\desktop.  Settings
like things set through the control panel would generally be in the registry.

The meanings of registry settings, since some are from Microsoft, others
from the device vendor and, potentially, still  others are from application
or driver vendors, are not available in one place.

Let me back up and propose a complete solution to your originally-expressed
problem.  Your device vendor should already provide something like this and
you should verify that they don't before diving in.

1. Create a program that will be launched by the system at startup using the
Init key method in the registry.

2. This program will wait for the shell, filesystem, etc. to be ready, then
will check for the presence of the flash filesystem that your device provides.

3. When the flash filesystem is found, the program will find a specific
folder in the flash filesystem, call it Startup.  If the root path of the
flash filesystem is \flash, this folder would be found at \flash\startup.  
The program will enumerate all of the items in this folder and 'start' each
one, using ShellExecuteEx().

The net effect of this is that you can put a shortcut to some application
that you want launced (or the EXE itself), in the flash filesystem Startup
folder and yet have it launched automatically on startup without having to
(further) screw around with the registry.

In every device I've built with Windows CE, I've *always* provided a utility
that does exactly this, so I'm surprised that your device vendor isn't doing
it.  Check with them!

Paul T.

> Hello Bruce,
>
[quoted text clipped - 18 lines]
>
> Martin
Martin M - 26 Mar 2010 18:31 GMT
Hello Paul,

thank you for this explanation.
Yes, Digi provides an autostart tool that can start applications after an
adjustable waiting time.
Meanwhile I also found that I can write applications directly to the flash
disk via Digis Remote File Inspector. I guess this is something like an FTP
server or at least an FTP server will also do the job ?
So I will try these things and build a small autostart application.

Thank you for yout help

Martin
Paul G. Tobey [eMVP] - 27 Mar 2010 00:10 GMT
When you build the program, Visual Studio (or whatever tool you are using),
should download the application to the target device automatically when you
build it successfully...

Paul T.

> Hello Paul,
>
[quoted text clipped - 9 lines]
>
> Martin
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.