CMI HELP

  • Thread starter Thread starter Srivathsan
  • Start date Start date
S

Srivathsan

Hi all

I am doing an analysis which requires all the components in the
database for which i need to write an CMI script which adds all the
components in the database. I tried to undestand the CMI explorer but
without result. Can anyone tell how 2 add all the components in the
database by CMI ???

Thanks
Srivathsan.A
 
Srivathsan,

Well.. I posted CMIExplorer script that adds a few components to a newly created SLX config. You can search NG archive to see that
script.

However, I prefer doing CMI scripts with my own components instead. That's just my own preference.

To add components from database you have to create the component instances first and add them to a Config.

Anyway, why would you need to add ALL the component from database? This would not be possible with current XPe tool (each component
instance is memory consuming and the entire Config would be amazingly huge).
 
Well.. I posted CMIExplorer script that adds a few components to a newly
created SLX config. You can search NG archive to see that

Could u please send me the link ???I cant find one...
Anyway, why would you need to add ALL the component from database? This would not be possible with current XPe tool (each component
instance is memory consuming and the entire Config would be amazingly huge).

Yes I have an application that works in XP Professional and not in the
Embedded...
I tried XP Pro emulation as well as another configuration what we call all
components it dosent work. Then on analysing with the XP Professional
(deleting files and config) i found that there may be some driver dependancy
(not listed in the TAP) hence i need to add all the drivers in the database
and all the components to make a real xp professional.

Note: The file mon and the Regmon and all the other tools did not work with
this application.

Thanks
Srivathsan.A
 
Srivathsan,
created SLX config. You can search NG archive to see that

Could u please send me the link ???I cant find one...

E.g., http://groups-beta.google.com/group/microsoft.public.windowsxp.embedded/msg/87eaa532e2958373
Or
http://groups-beta.google.com/group/microsoft.public.windowsxp.embedded/msg/8fe3f687ba8450cd
Yes I have an application that works in XP Professional and not in the
Embedded...
I tried XP Pro emulation as well as another configuration what we call all
components it dosent work. Then on analysing with the XP Professional
(deleting files and config) i found that there may be some driver dependancy

How did you find that out?
(not listed in the TAP) hence i need to add all the drivers in the database
and all the components to make a real xp professional.

It won't be possible to create and build such Configuration.
Some of the driver in database (if not most - PnP) you can just copy along with their dependencies and INF files. Well, this is too
much work anyway.
Note: The file mon and the Regmon and all the other tools did not work with this application.

I'd actually suggest you to try out your application with Dependency Walker Profiling feature and Process Explorer from
sysinternal.com.
Also, make sure to check SetupApi.log.

KM
 
How did you find that out?

When I copied the entire system32 of windows XP into the xp embedded the
application works.

I cannot copy the config of the windows XP to the embedded since the image
gets crashed.

I tried XP Pro emulation hence the dependancy due to 'software:*' is not a
problem

Hence i concluded that there may be some hardware problem along with some xp
components ??

Some of the driver in database (if not most - PnP) you can just copy along with their dependencies and INF files. Well, this is too
much work anyway.

I will try that that's great.

I am going to copy all the sys files to driver dir and inf files to the inf
directory in the xp pro emulation this should add all the components....

am i correct...
I'd actually suggest you to try out your application with Dependency Walker Profiling feature and Process Explorer from
sysinternal.com.

I will also try this...


Another favour

I want to add help files for selected components hence i should not disable
the help files globally. Is it possible to disable help files in all the
components in the configuration using the CMI script and can u give info on
this????

thanks
Srivathsan.A
 
Srivathsan,
I tried XP Pro emulation hence the dependancy due to 'software:*' is not a
problem
Hence i concluded that there may be some hardware problem along with some xp
components ??

Not necessarily. XPProEmulation will build all the components with default settings. So you may be having the issue because of some
missing registry entries or vice versa because of some default registry entries.
I am going to copy all the sys files to driver dir and inf files to the inf
directory in the xp pro emulation this should add all the components....

am i correct...

I cannot say that. I don't know how much really from XP Pro was componentized. Presumably - everything from XP Pro RTM and following
SPs.

I do not think you've chosen a good approach (copying XP Pro files to your image) to debug the problem. There is other thing you
should try first (the Dep.Walker Profiling, Process Explorer, Regmon, Filemon, RegSnap, SetupApi.log, etc.).

What exactly problems you are having with the application?
Another favour

I want to add help files for selected components hence i should not disable
the help files globally. Is it possible to disable help files in all the
components in the configuration using the CMI script and can u give info on
this????

I have written a similar script a long time ago. If you use XPeTools package from www.xpefiles.com and include the macro component
XPeTools, you will find the appropriate option(s) - disable/enable help file for all the components in the configuration - on the
component's settings page.

KM
 
What exactly problems you are having with the application?

Hi

The Problem is with Infeneon TPM module and its application
This hardware gets detected in both the XP Professional and in the Embedded.
But the associated application does not work in our XP Embedded OS but works
well in the XP Professional.

The seccurity platform should get initialised for every user but it is not.

It gives out an error An internal error occurred 0x80090020

The following analysis are done:

1. The filemon and regmon does not help us
2. we even tried process explorer -
In the XP Pro we observed during a transistion an exe is invoked but the
same exe is not be called in the XP embedded.
How to analyse the doot of this cause???
3. This is not working in PRO emulation and All Components


The application works when system32 of XP Professional is swapped to XP
Embedded.

How can we continue our analysis???

Srivathsan.A
 
Hi KM

I am Halfway in the CMI

Actually i added all the instances to the configuration but i cant build in
the CMI explorer.

dbo computername
new ins instances
ins = 'instances:*'
new slx config
add slx ins
*li
Variable Type Value

------------------------ ----------------
--------------------------------------
INSTANCES Instances [11668 items]

SLX Configuration [Revision 1]

*slx = CFDB(Config, cmiFTNone, CP)
slx = CFDB(Config, cmiFTNone, CP)
Error -2147024809 (0x80070057) in "CMI.CMI.1": The parameter is incorrect.

Error in command: "cfg = CFDB(Config, cmiFTNone, CP)"
[LET cfg = CFDB Config,cmiFTNone, CP)]


i saw the following command in the CMIEXP.WSF

DBOPEN setup
NEW cfg Config
cfg = CFDB(Config, cmiFTNone, CP)
cfg.build 0, "c:\foo"

what is wrong???

srivathsan.A
 
Srivathsan,

What is still unclear to me from your message is why Filemon and Regmon does not show you anything?
Usually it is pretty straightforward to use these tools when you have a error occurring in a app.

Any chance for you to zip the Filemon and Regmon logs and post it here?


Also, since you are saying copying the XP Pro system32 makes the difference. I'd again suggest you to go through the application
binaries with Dependency Walker Profiling.
Also, you can copy the XP Pro binaries partially (set by set) to find out what Dlls made the difference.
 
Srivathsan,

You are almost there.

A few tips for you:
- CFDB is just a wrapper around the CreateFileDB function. The sample you got all the help is completely wrong.
But why do you need to use it anyway? What object(s) you're trying to create from DB? You already created the Config as well
as the instances.

- Add "save slx <your file.slx>" command at the end of the file to not keeping doing the long operations again and again.

- Lower your minvisibility level to "see" all the components in database.

So, the simple edit of your code would look like:

; Setup is the default db
DBOPEN setup
; Lower minimum visibility level - always good idea
minvis 0

new ins instances
new slx config

ins = 'instances:*'
add slx ins

; Show or Dump the Instances collection if you want to debug it
; show slx
; dump slx

SAVE slx AllInstances.slx

BYE


Now the real problems:
- You config will fail when is loaded within TD or built with TD or CMIExp. One of the reasons - the config will include all
instances including the same component with different revision numbers (and even different component versions).

- Some of the component cannot be added to the Config directly, e.g. some Prototypes (see the XPProEmulation rel.notes for the
complete list)

- Some of the component cannot be built, e.g. some MUI Prototype (again see the XPProEmulation rel.notes for the complete list)

- Expect that the Config will eat up so much memory that you may not even have on your system (increase pagefile size just in
case). This is all on the top of WSH which makes it even worse.

Basically, trying to avoid these problems you are going to end up with the code that is already in the XPProEmulation component.
I don't think the CMIExp will give you any advantage over it.
 
Srivathsan,

I just hope that you have copied ONLY system32 folder WITHOUT subfolders.
This is very important.
If you have problems with system32 folder then it will be easy to find out
what is missing.
My guess is that you have done a bad job in componentizing that application
and that files installed to system32 by it are copied by you only when you
copy system32 folder.
If you have a clean XP Pro try copying files from there to XPe and see if
your application want to work.

Try to determine what files must be there for program to start to work.
Make a backup of your non working XPe. And then start copying sets of files
like Konstantin said.

Regards,
Slobodan
 
HI KM and "Slobodan Brcin (eMVP)" wrote:

Thanks for the suggestions

Finally we have found out the registry that made a difference

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\CLSID]
@="{0000031A-0000-0000-C000-000000000046}"

this is referenced by iMoniker COM object

Why it is missing in the XP Embedded XP Pro Emulation the microsoft only
knows???

-----------------------------------------------------------------------------------------------

CMI
dbo computername
new ins instances
ins = 'instances:*'
new slx config
add slx ins
*li
Variable Type Value

------------------------ ----------------
--------------------------------------
INSTANCES Instances [11668 items]

SLX Configuration [Revision 1]

How to build in the configuration in the CMI Explorer???

when i opened the configuration in the TD it gives an warning
Initializing new component: "Adaptec AIC-7880 PCI Ultra SCSI [Version
5.1.2600, R620]"
Info 101: Initializing new component: "Adaptec AIC-7870 PCI SCSI
Controller [Version 5.1.2600, R620]"
Info 101: Initializing new component: "Adaptec AHA-2940U2 - Ultra2 SCSI
[Version 5.1.2600, R620]"
Info 101: Initializing new component: "SCM PPort SCSI Adapter [Version
5.1.2600, R620]"
Info 101: Initializing new component: "Adaptec AHA-3944UW PCI SCSI
Controller [Version 5.1.2600, R620]"
Info 101: Initializing new component: "Adaptec AIC-786X PCI SCSI
Controller [Version 5.1.2600, R620]"

but it builds

how to build in the CMI ...

Thanks
Srivathsan.A
 
Missed the second part of your question..

Look at the CMIExp help. You will find Config.build command there.

KM
Srivathsan,

If we knew a bit more about your application we would probably help you earlier.
Please read through this thread: http://groups-beta.google.com/group/microsoft.public.windowsxp.embedded/msg/b8efc27b0e5bc757

KM
Thanks for the suggestions

Finally we have found out the registry that made a difference

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\CLSID]
@="{0000031A-0000-0000-C000-000000000046}"

this is referenced by iMoniker COM object

Why it is missing in the XP Embedded XP Pro Emulation the microsoft only
knows???

-----------------------------------------------------------------------------------------------

CMI
dbo computername
new ins instances
ins = 'instances:*'
new slx config
add slx ins
*li
Variable Type Value

------------------------ ----------------
--------------------------------------
INSTANCES Instances [11668 items]

SLX Configuration [Revision 1]

How to build in the configuration in the CMI Explorer???

when i opened the configuration in the TD it gives an warning
Initializing new component: "Adaptec AIC-7880 PCI Ultra SCSI [Version
5.1.2600, R620]"
Info 101: Initializing new component: "Adaptec AIC-7870 PCI SCSI
Controller [Version 5.1.2600, R620]"
Info 101: Initializing new component: "Adaptec AHA-2940U2 - Ultra2 SCSI
[Version 5.1.2600, R620]"
Info 101: Initializing new component: "SCM PPort SCSI Adapter [Version
5.1.2600, R620]"
Info 101: Initializing new component: "Adaptec AHA-3944UW PCI SCSI
Controller [Version 5.1.2600, R620]"
Info 101: Initializing new component: "Adaptec AIC-786X PCI SCSI
Controller [Version 5.1.2600, R620]"

but it builds

how to build in the CMI ...

Thanks
Srivathsan.A
 
KM said:
Missed the second part of your question..

Look at the CMIExp help. You will find Config.build command there.

KM i cannot find one in the help except
*cfg.build 0, "c:\foo"
where cfg is a configuration

in my case it is not working

Can u please send the help ???

Thanks
Srivathsan.A
 
Srivathsan,

I am sorry. By the help I just "CMIExp /?". This is unfortunately all available for CMI/CMIExp :-(

For the build instructions please check out a few threads above between me and Mikhail Mintchenkov.
After all you may want not to go with CMIExp for the builds.
 
Back
Top