Hi,
I looked at BootExecute - it's empty.
BUT, when I ran bootvis I told you I saw 2 userinit process, so I opened
the
registry, and went to:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit
and there I saw something a bit odd, the value was:
d:\windows\system32\userinit.exe ,d:\windows\fba\fba.exe -run
Seemed to me that fba.exe -run shouldn't be there, so I removed the
fba -run
and path, restarted, and then, problem solved! NO MORE 2 Shells!!!

Now, the question is, why was FBA in userinit in this stage(after the
image
is completely built)?
Thanks,
Tomer.
tomer,
Well... Delayed boot is a different problem (I'd sugegst you to start a
new
thread if you need help with it).
Regarding the shell double launch - confusing. It must be something
that
we
are missing from the picture.
It would be better to narrow down the area.
At runtime can you launch regedit (or do the following offline) and go
[HKLM\Test\CurrentControlSet\Control\Session Manager] key, remove
fbastart
value from BootExecute multistring value? then reboot and see if your
shell
is launched twice. this way we will know if it is FBA cuases the issue.
Regarding the application code change. You dont really need to "kill"
the
second instance. Just don't allow the app to start if there is another
instance of the app running. For example, create/open a named event at
the
start of the WinMain and check the event status. If set - exit the app,
if
not - set the event and continue the app code flow. Nothing
"unprofessional".
KM
Hi,
Well, I checked all the registry values (offline) none contained any
shell
refrences.
Checked system.ini - nothing.
Checked startup folder - nothing.
I ran bootvis and saw my shell process is run twice and so does
"userinit.exe".
I also see "fba.exe" is run with every boot. Is this normal?
I thought about killing one process via my app, but in most cases
because
of
the process are launched almost togther, they kill each other

Anyhow even if I dedicate time and solve the dual-kill issue, it is
not
an
option, because it delayes boot time and is very unprofessional.
Thanks,
Tomer.
tomer,
A few more things to check (it may not be the reason for double
shell
launch
but may still be worth to check):
I know youve search through the registry at run time but I'd
suggest
you
to shutdown the device and explore the registry hives offline:
- check [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run],
[...\RunOnce] and [...\RunOnceEx] keys.
- the same keys under HKCU.
- check [HKLM\Test\FBA\RunOnce]
- check \%systemRoot%\system32\systme.ini file for SHELL entry
(take
the
runtime's system.ini)
- check all your StartUp items, e.g. under "\Documents and
Settings\All
Users\Start Menu\Programs\Startup".
You can use BootVis to analyze the booting process on your image.
In any case you can work around the problem by adding initial code
in
to
your custom app to check for already running app instance
(FindWindow
approach or any signaled kernel object you set in your app).
KM
I replaced my shell with notepad and got 2 instances of it.
Also, I notice the time it takes to logon is really long... At
first I
tought it was because of my app.. but it's the same with notepad so
I
begin
to suspect something is deeply wrong with this image
Come to think of it, I tried before using only the CMD Shell with
my
previous image to test a few thing and it loaded twice too!!!
I've managed to get myself confused now...
What can cause this?
On FBA there's:
Silent DX9.0c + managed extensions setup
Silent ATI IGP chipset setup
Silent LAN Driver setup
Silent Sound Card driver setup
Silnet .NET 2.0 Framework Beta setup.
The Image is mostly based on Advanced Set-top Box
Hi,
This looks ok.
Then problem is either with your application launching itself.
(Everything
is possible)
Or some problem with .Net I have never used shell application
that
use
.Net.
For test rename notepad.exe and copy it over your shell
application.
If you have only one notepad instance then your application is
responsible.
Best regards,
Slobodan
Hi,
Thanks for your replay.
I searched the regsitry and got the following results:
on:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon\Shel
l
and that's probably ok.
I got another 2 hits in:
HKEY_LOCAL_USERS\SOFTWARE\Microsoft\Direct3D\MostRecentApp
and again in almost same path just on HKEY_USERS
I think these 2 hits are pretty harmless since my app is
partially
a
D3D
app.
So I got 3 hits, and they look ok to me, correct me if I'm
wrong.
Any thoughts?
Hi,
No idea what you are doing wrong, and this in not regular
behavior.
If you can execute regedit from XPe, or open registry offline.
And search trough it for your shell executable name. If you
find
it
on
more than one place let us know so we can narrow the problem
down.
Best regards,
Slobodan
Hi,
I wrote a .NET shell replacement application and
componentized
it
to
a
shell
component in XP Embedded.
Problem is, for some reason the shell app is being launched
twice
on
boot!
Is this common behavior?
Is there a way to baypass it?
To make a long story short, what the hell am I doing wrong?
Thanks,
Tomer.