Compartilhar via


Console Application for Windows XP Embedded

I've been waiting for months now to talk about this tool publicly, so now that we've released FP2007 CTP, I finally can. Those of you who have tried to work with CMI Explorer, the value-add command-line tool we shipped with XPe SP1, will be really happy once you finish reading this article.

In Feature Pack 2007, we're shipping a new version of CMI Explorer, renamed "Console Application for Windows XP Embedded", or XPeCon for short. I am, in fact, the developer for this tool – back in January, Andy basically gave me free reign over this tool, and in that time we fixed a lot of bugs and addressed a whole bunch of customer scenarios. The result is a tool that went from unstable value-add curiosity to very powerful scripting engine! In fact, we are so confident that you'll benefit from this command-line app that we included it in the "bin" folder of the FP2007 Tools Update.

When you go to access the MS Connect FP2007 CTP download site, you'll notice that there's an extra document offered for download as well: "XPeCon_How_To.doc". This Word Doc describes how to perform various kinds of tasks using XPeCon, such as creating and editing configurations, building a runtime, editing component properties, and looking up components in the database. XPeCon also allows you to import components into your database, research component relationships (through the DEPTREE and DEPTRACE commands), and dump the contents of SLD files in a folder.

As a really quick way to get started, you can copy the following script code to a text file and save it with the .RSP extension, then use it within XPeCon:

initcfg myconfig
add myconfig 'inst:Winlogon Sample Macro'
add myconfig 'inst:User Account'
add myconfig 'inst:User Account'
myconfig.ResolveDependencies 2
get x myconfig "User Account"
x.cmiUserName = "Matt"
x.cmiUserGroup = 0
get x myconfig "User Account #2"
x.cmiUserName = "Nick"
x.cmiUserGroup = 1
save myconfig "c:\winlogon_users.slx"
myconfig.Build 1,"c:\winlogon_users\"
exit

This script creates a configuration with the Winlogon Sample Macro and two user accounts, resolves dependencies, sets the user accounts to "Matt" (Administrator) and "Nick" (Power User), then saves the configuration and builds it. A similar scenario is covered in the How-To doc.

I am really enthused to see this CTP out in the public, and XPeCon along with it. Many people have been asking for a scriptable version of Target Designer and other tools for quite a while, and I'm really happy to finally be able to say we have one for you. Please let us know in the Beta newsgroup what you think, (signup at the MS Connect site linked above) and if you have any feedback, bug reports, feature requests, etc., please feel free to send them to us!

Happy building!

- Matt

Comments