Custom Shell fails to load

A

aslank

Please excuse me in advance if this does not directly relates to XPE.
I could not find answers on any blogs nor I could find related topics.

I am creating recovery image for XPE device using OPK custom WINPE
instructions.
In short I have MFC (built with VS 2005) application (34KB) that
prepares media (disk), formats and copies XPE image. The goal is for
this app to replace CMD shell.

I tested app by, booting with WINPE (using 1 disk of Windows XP
Embedded tool kit), connecting to one of my PC (using net use ....),
copying application to formatted (NTFS) disk on that target machine
and launching. Application gets invoked. (I stubbed all
functionality. My goal is to see if application can be run)

Then I burned custom PE image and included (not as a shell,) my app.
Booted into WINPE (using that custom image which is using CMD as a
shell) and ran application form the CD. Application did not get
invoked.

Curious enough I copied application (still in winpe) from CD to C:
drive (no files on c: drive, it is still formatted to NTFS) and ran
app. It did get invoked.

What am I missing?
Same application, in the same environment (WIN PE), but if launching
from CD it does not get invoked, if launching from C:\, it doe get
invoke.

It is no the size, since calc.exe is 112KB and it works ( I tested it)
and my app only 34KB.
Does the burring process (creation of ISO image) does something?
Probably not because I tested with calc.exe (which I burned for
testing).

Then what, can someone please let me know what I am missing.

Thank you
Aslan
 
A

aslank

Please excuse me in advance if this does not directly relates to XPE.
I could not find answers on any blogs nor I could find related topics.

I am creating recovery image for XPE device using OPK custom WINPE
instructions.
In short I have MFC (built with VS 2005) application (34KB) that
prepares media (disk), formats and copies XPE image. The goal is for
this app to replace CMD shell.

I tested app by, booting with WINPE (using 1 disk of Windows XP
Embedded tool kit), connecting to one of my PC (using net use ....),
copying application to formatted (NTFS) disk on that target machine
and launching. Application gets invoked. (I stubbed all
functionality. My goal is to see if application can be run)

Then I burned custom PE image and included (not as a shell,) my app.
Booted into WINPE (using that custom image which is using CMD as a
shell) and ran application form the CD. Application did not get
invoked.

Curious enough I copied application (still in winpe) from CD to C:
drive (no files on c: drive, it is still formatted to NTFS) and ran
app. It did get invoked.

What am I missing?
Same application, in the same environment (WIN PE), but if launching
from CD it does not get invoked, if launching from C:\, it doe get
invoke.

It is no the size, since calc.exe is 112KB and it works ( I tested it)
and my app only 34KB.
Does the burring process (creation of ISO image) does something?
Probably not because I tested with calc.exe (which I burned for
testing).

Then what, can someone please let me know what I am missing.

Thank you
Aslan



Ok, I found a solution. Since I new that the app is working, so the
problem lied in how app loads DLLs and gets invoked under WINPE
environment I started poking project settings. In short if an app is
a WIN32:
Then settings has to be changed in: Project Property->Configuration
Properties->C/C++->Code generation and set Runtime Library to Multi-
threaded (/MT)

If an MFC:
Then settings has to be changed in: Project Property->Configuration
Properties->C/C++->Code generation and set Runtime Library to Multi-
threaded (/MT)
And
Project Property->Configuration Properties->General and set Use of MFC
to Use MFC in a static Library

Hopefully if someone ever hit this problem finds this helpful.

Aslan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top