Example Scenario: Creating and Building a Sample Runtime
The following example is an end-to-end script that creates a runtime based on the Winlogon sample macro. This script adds two user accounts, one as an administrator, auto-resolves dependencies, changes a few settings, and then builds the runtime.
xpecmd> dbopen myServer xpecmd> initcfg cfg xpecmd> cfg.Instances.Add 'inst:^Winlogon Sample Macro' xpecmd> new myInst Instance xpecmd> myInst = 'inst:^User Account' xpecmd> cfg.Instances.Add myInst xpecmd> myInst.Properties("cmiUserName") = "Matt" xpecmd> myInst.Properties("cmiUserGroup") = 1 xpecmd> myInst = 'inst:^User Account' xpecmd> cfg.Instances.Add myInst xpecmd> myInst.Properties("cmiUserName") = "John" xpecmd> cfg.ResolveDependencies 2 xpecmd> cfg.CheckDependencies 2 xpecmd> get myInst cfg "User Interface Core" xpecmd> myInst.Properties("cmiShowRun") = true xpecmd> myInst.Properties("cmiShowControlPanel") = true xpecmd> save cfg "c:\images/myImage.slx" xpecmd> build cfg "c:\images/myImage"
Last updated on Wednesday, October 18, 2006
© 2006 Microsoft Corporation. All rights reserved.