On XP Emb intl.cpl aks to install many files (e.g. the msagent "do

G

Guest

Hello,

I have to change the MUI and the locale settings (automated) on a Windows XP
Embedded machine.

On a Windows XP Professional machine I can call
"rundll32 shell32, Control_RunDLL, intl.cpl,,/F:"c:\...\xyz.tmp"
(or alternatively "control.exe intl.cpl,,/F:"c:\...\xyz.tmp")
In the tempfile I define the locale and MUI settings as described in:
http://support.microsoft.com/default.aspx?scid=kb;en-us;289125&sd=tech

So far so good. On XP prof. that successfully changes my lanugage and MUI.

But when I execute that on XP Embedded, the user is asked to specify the
install location of 'xp prof SP1' ?!?? When I manually copy the needed files
from my Win XP Prof. machine to the XP Emb. machine, I have to copy many
files (about 30-50). dlls, fonts, helpfiles and even the msagents - the dog
that appears in the office help or in the file search dialog ... But finally
this helps and enables my XP Emb machine to execute the desired functionality.

(Note: This also occures when I do _not_ use rundll32 and instead call
loadlibrary("shell32") myself.)

(Note: Just calling "control.exe intl.cpl" does not produce the
file-copy-problem. Only when I specify the /F:"..." parameter the
file-copy-problem occurs.)

What can I do ? I do not want (and maybe aren't even allowed) to ship this
files along with our XP Emb Image.

I tried another approach and tried to write the stuff that the function
Shell32.dll::Control_RunDLL() does myself (to have the advance to be able to
omit the Shell32.dll - in case the shell32.dll causes the
file-install-problem). So I call LoadLibrary("intl.cpl") and talk to intl.pcl
directly via the CPL_ messages. Unfortunately there is nearly no
documentation at all out there (MSDN, Google ...) about the working of this
function (Shell32.dll::Control_RunDLL()).

Questions:
1) Would my last approach help to avoid the fileinstallation ?

2) Can any of the MVPs out there send me the sourcecode of the shell32.dll
function Control_RunDLL() ? Or is the inner working of that function
documented anywhere ?

3) The following code tries to act like Control_RunDLL. But the
CPL_STARTWPARMS allways returns 0 (error) to me. What am I missing (that
Control_RunDLL has implemented) ?

h = LoadLibrary("intl.cpl");
TCPLApplet pCPLApplet = (TCPLApplet) GetProcAddress(h, "CPLApplet");
pCPLApplet (0, CPL_INIT, 0, 0);
pCPLApplet (0, CPL_STARTWPARMS, 0, "c:\...\xyz.tmp");

The last call returns 0 (error). What am I missing ?

Thanks a lot.

Roelof Berg
BOSCH Security Systems GmbH
Germany
 
K

KM

Roelof,
What can I do ? I do not want (and maybe aren't even allowed) to ship this
files along with our XP Emb Image.

.... >

Questions:
1) Would my last approach help to avoid the fileinstallation ?

Personally, I odn't think the approach will help you with the issue.
Theoretically Shell32 Control_RunDLL does nothing more than just a CPLApplet call with passed arguments for a matched cpl.

But you can test your approach first to be sure (see below how to fix it).
2) Can any of the MVPs out there send me the sourcecode of the shell32.dll
function Control_RunDLL() ? Or is the inner working of that function
documented anywhere ?

Who said MVPs necessarily have access to Microsoft OS source code? :)
In any case, they won't be able to send you the code (or any part of the code) because they sign NDA and other legal documents.
3) The following code tries to act like Control_RunDLL. But the
CPL_STARTWPARMS allways returns 0 (error) to me. What am I missing (that
Control_RunDLL has implemented) ?

h = LoadLibrary("intl.cpl");
TCPLApplet pCPLApplet = (TCPLApplet) GetProcAddress(h, "CPLApplet");
pCPLApplet (0, CPL_INIT, 0, 0);
pCPLApplet (0, CPL_STARTWPARMS, 0, "c:\...\xyz.tmp");

The last call returns 0 (error). What am I missing ?

You have to pass "/f:c:\...\xyz.tmp" or, if the path includes spaces, "/f:\"c:\...\xyz.tmp\"" as lParam.

Also, exploring the intl.cpl binary with debugger you may find more useful command line switches.
E.g., /S. (I never tried it so I am guessing here and leaving the real tests for you).
You may want to try something like this:
- Copy all new required file somewhre under c:\SourceDir (any path here)
- Launch
rundll32 shell32, Control_RunDLL, intl.cpl,,/F:"c:\...\xyz.tmp" /S:"c:\SourceDir"
or use your own code (just add /S the same way as /F)

Good luck and let us know if it works.

KM
 
G

Guest

Hello,

thanks a lot for the post. There's allways a good support in the MS
newsgroups :)

I have tried for a few more hours to get CPL_STARTWPARMS to work but
canceled then because it stubborny keeped to return 0. And because the chance
that this would solve the problem was quite low anyway.

I found out that if I hit "cancel" on the "Add Files ... insert win xp cd
...." dialog this does not affect the further operation, however. When I hit
cancel on the first file-request-dialog, no other file-request-dialogs
appear and intl.cpl properly changes the DefaultLocale,
Date/Time/Currency-Format, Keyboard-Layout and the MUI-Language.

So I will add a little thread that hits "cancel" on the filerequest dialog
as soon as it appears and have my functionality working ... Not 100%
satisfactory but that way I can proceed with more important things now ... I
hope in the next version of XP Embedded this is fixed.

Thanks,
Roelof
 

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