Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CMI Explorer

16 views
Skip to first unread message

Larry Waibel

unread,
Oct 25, 2005, 3:45:35 PM10/25/05
to
I'm trying to use the CMI Explorer to automate the importing of components
into our SCM-controlled XPe database. I have some .sld files that have
components and repositories in them. We just discovered that the repository
files weren't being copied. So in a batch file I tried the following:

dbi porttalk.sld \\%COMPUTERNAME%\Repositories

but I get the error below. Any suggestions on how to automate repository
importing? Thanks!

Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

CMI Explorer version 3.14.620 (CMI revision 578)
Copyright (C) 1999-2001 Microsoft Corp. All Rights Reserved.

Platform GUID : {B784E719-C196-4DDB-B358-D9254426C38D}
Platform : (not in database)
Server : WAIBELXPD
Database : MantisSQLDB
Generation : {6437BF39-3730-4FCC-BFF2-6FD2AA0B6F76}
Open mode : ReadImport (1)
Repository : Port Talk repository ->
\\waibelxpd\repositories\{E6A87783-0984-4C5E-9C69-FA00A14F6ABF}
Error -2147212453 (0x8004235B) in "CMI.CMI.1": CMI.ImportCarrier cannot copy
files to the repository directory
\\waibelxpd\repositories\{E6A87783-0984-4C5E-9C69-FA00A14F6ABF} because it is
not empty.
Error in command: "dbi %SLDFILE% \\%COMPUTERNAME%\Repositories" [dbi
\sdcots\winxpe\src\porttalk.sld \\WAIBELXPD\Repositories]


Andy Allred [MS]

unread,
Oct 26, 2005, 12:46:27 PM10/26/05
to
If the rep already exists, check the permissions on the folder *and* the
files in the rep. The error below will probably come from not being able to
overwrite existing files in that rep. Try deleting the rep and re-importing
(assuming you have permissions on the root share folder and they're allowed
to be propagated to all child objects under that root).

Andy

--
Embedded team blog: http://blogs.msdn.com/embedded/

This posting is provided "AS IS" with no warranties, and confers no rights.

"Larry Waibel" <lwa...@no-spam-cox.net> wrote in message
news:VA.000002e...@no-spam-cox.net...

Larry Waibel

unread,
Oct 26, 2005, 3:57:07 PM10/26/05
to
The problem is that I'm trying to run this in an automated way. The script
doesn't allow me to query the Repository path, etc. so I don't have any
automated way of deleting the files. The script needs to have some way to tell
it to go ahead and overwrite any files or at least a way to delete the
repository based on what's in the .sld file. If I manually use Component
Database Manager to delete the repository first then the import works but
that's prone to user error.

In article <emuEQzk2...@TK2MSFTNGP09.phx.gbl>, Andy Allred [MS] wrote:
> From: "Andy Allred [MS]" <and...@online.microsoft.com>
> Subject: Re: CMI Explorer
> Date: Wed, 26 Oct 2005 09:46:27 -0700
> Newsgroups: microsoft.public.windowsxp.embedded

Lynda Allen (MS)

unread,
Oct 31, 2005, 7:49:52 PM10/31/05
to
The sld will contain the Repository VSGUID under the Repository element-
maybe your script can query the sld file for the this property
(RepositoryVSGUID= " <GUID>" and then query if any folder with that guid as
a name exisit on the system and delete it before calling the Import
function.

Larry Waibel

unread,
Nov 1, 2005, 10:39:50 AM11/1/05
to
I know almost nothing about Windows scripting :-) I'm just running the
CMIExplorer commands in a batch file. What I was hoping was that the
CMIExplorer would provide an option that would tell it to either overwrite the
repository (this seems to be the behavior of the Component Database Manager GUI
so I'd expect this to be the default for the CMIExplorer) or, as you suggest,
that it would find and delete the repository folders. Also, some of my
components have more than one repository so there'd be a need to find them all.

In article <#SeUs4n3...@TK2MSFTNGP12.phx.gbl>, Lynda Allen (MS) wrote:
> From: "Lynda Allen \(MS\)" <lya...@online.microsoft.com>
> Subject: Re: CMI Explorer
> Date: Mon, 31 Oct 2005 16:49:52 -0800
> Newsgroups: microsoft.public.windowsxp.embedded

Larry Waibel

unread,
Nov 4, 2005, 1:53:14 PM11/4/05
to
Is this all I can expect as a solution from Microsoft? I was hoping the
CMIExplorer would be fixed to work like the GUI in this respect. I need an
answer of what the future Microsoft action might be so I can decide if I'm
going to have to revert to a manual method which I'd really hate to have to do.
Thanks!

In article <#SeUs4n3...@TK2MSFTNGP12.phx.gbl>, Lynda Allen (MS) wrote:
> From: "Lynda Allen \(MS\)" <lya...@online.microsoft.com>

> Subject: Re: CMI Explorer


> Date: Mon, 31 Oct 2005 16:49:52 -0800
> Newsgroups: microsoft.public.windowsxp.embedded
>

Andy Allred [MS]

unread,
Nov 7, 2005, 4:11:43 PM11/7/05
to
Sorry Larry, i think i asked this before about the permissions, but can you
please try this again *after* you do the one time workaround of going to the
repository root (the shareed folder) and change the permissions so that your
account (or whoever) can have full access?

Then go to the advanced properties and ensure that all files and folders
that are children of that root inherit those permissions.

Then try your test again. The problem your reporting appears to be the same
question from people that try to re-import the same repository object and
files via Database Manager.

Most folks like you that want to re-import newer versions of the component
*and* rep simply set the share permissions to read/write for "everyone" and
NTFS rights for the appropriate accounts.You can find this same issue
discussed by searching the newsgroup archives for something like "repository
permissions".

Thanks

Larry Waibel

unread,
Nov 7, 2005, 7:17:28 PM11/7/05
to
If you did ask before, I never saw it. My repository share already has
everyone permissions for Full Control and it's inherited. I can 'reimport'
using Database Manager just fine; it's only when I try to use CMI Explorer that
I get this problem. The script is specifically detecting/reporting that the
directory is not empty, not that access is denied:

Error -2147212453 (0x8004235B) in "CMI.CMI.1": CMI.ImportCarrier cannot copy
files to the repository directory
\\waibelxpd\repositories\{E6A87783-0984-4C5E-9C69-FA00A14F6ABF} because it is
not empty.


In article <uv$tb$94FHA...@TK2MSFTNGP15.phx.gbl>, Andy Allred [MS] wrote:
> From: "Andy Allred [MS]" <and...@online.microsoft.com>
> Subject: Re: CMI Explorer

> Date: Mon, 7 Nov 2005 13:11:43 -0800
> Newsgroups: microsoft.public.windowsxp.embedded

Larry Waibel

unread,
Nov 17, 2005, 10:05:45 AM11/17/05
to
For anyone else that's running into this, I was able to get it to work by
modifying cmiexp.wsf as follows:

' Event called by CMI to allow host (us) to process repository files
Function cmi_OnImportRepository(sSrcRoot, sDstRoot, sSrcPath, sVSGUID,
sDisplayName)
Dim sDstTemp
sDstTemp = g_oFSO.GetAbsolutePathName(sDstRoot) ' Get dest root
sDstTemp = g_oFSO.BuildPath(sDstTemp, sVSGUID) ' Use VSGUID for destination
WLF "Repository : " & sDisplayName & " -> " & sDstTemp
If g_bNoCopyImportSwitch Then ' If no copy..
cmi_OnImportRepository = sDstTemp ' Set but no copy
WLF "(copy suppressed)"
Else
cmi_OnImportRepository = cmiDefaultFileCopy ' Set but no copy
' Added the following if statement to allow 'reimporting'
If g_oFSO.FolderExists(sDstTemp) Then
g_oFSO.DeleteFolder sDstTemp, true ' Remove the repository so it
can be imported again
End If
End If
End Function

In article <#SeUs4n3...@TK2MSFTNGP12.phx.gbl>, Lynda Allen (MS) wrote:
> From: "Lynda Allen \(MS\)" <lya...@online.microsoft.com>

> Subject: Re: CMI Explorer


> Date: Mon, 31 Oct 2005 16:49:52 -0800
> Newsgroups: microsoft.public.windowsxp.embedded
>

0 new messages