Windows Embedded Standard 2009 Prepkit
Total Page:16
File Type:pdf, Size:1020Kb
MCTSi Exam 70-577 Windows Embedded Standard 2009 Preparation Kit Certification Exam Preparation Automation Not for resale. ii Table of Contents Contents at a Glance 1 Creating and Customizing the Configuration 2 Managing the Development Environment 3 Integrating Embedded Enabling Features 4Creating Components 5 Generating and Deploying an Image 6 Adding Windows Functionality Chapter 6 Adding Windows Functionality Microsoft® Windows® Embedded Standard 2009 enables you to add to the run-time image custom functionality that enhances security and the user experience. For example, you can customize a client shell to expose selected functionality of the device. You can also enable remote administration on your device, add multiple languages, and add multiple user accounts. Exam objectives in this chapter: ■ Create a custom shell component ■ Configure multiple user accounts ■ Configure security ■ Add support for multiple languages ■ Add support for remote administration Before You Begin To complete the lessons in this chapter you need the following: ■ Windows Embedded Studio for Windows Embedded Standard 2009 installed. ■ Completed Chapters 1–5. 177 178 Chapter 6 Adding Windows Functionality Lesson 1: Create a Custom Shell Component Windows Embedded Standard 2009 provides several shells, such as Explorer shell, Task Manger shell and Command shell. You can extend the functionality they provide by creating a custom shell that reflects your application and OS design functionality. For example, if your device monitors a car’s engine at a service garage, the display may need to present gauges that show engine condition and buttons to operate the device. Because the use of embedded devices is so specific, it is preferable that the user not be able to start applications, access the file system or interact in the way they usually do with regular Windows XP client based computers. You can use a custom shell to limit user access to only specific functionality. After this lesson, you will be able to: ■ Create a custom shell. ■ Create a component and add it to the component database. ■ Add the necessary components to run it. Estimated lesson time: 30 minutes. Shell Details A shell is a program that enables a user to access the services that the operating system provides, such as kernel and file system services. How to Create a Custom Shell Creating a custom shell entails designing and implementing an application. This application provides a coherent method for the user to access the functional services you want them to use. Start by deciding the functional access you want to offer the user. Next, decide how the user will view the device and how your device displays these functional options to the user. The Win32® API provides you with all the system calls you need to access the operating system services, such as file system access, process control, and authorization functions. Programming Tools For best performance and small footprint, use a C compiler and the Win32 API. Although it is possible to use frameworks such as MFC or the .NET framework, you would have to add the framework components to your configuration if you want to use them, which take up space and increase image size. Keep in mind that C is not a Lesson 1: Create a Custom Shell Component 179 rapid application development (RAD) tool and requires some programming effort. Practice 1 shows you in detail how to create a simple shell application and component. Creating a Shell Component After you create your shell application, create a component to contain it. This will provide you with a shell component that you can use in Target Designer to add to your configuration. Creating a shell component is very much like creating any component for any application; however, you must associate it with the group of shell components. The first thing that you have to do when you create the component is to prototype it using the Shell Prototype component. In the details pane, enter the Shell Prototype component in the prototype field. Next, click Advanced. In the Advanced Properties dialog box, click Add. In the Extended Property dialog box, provide the following information: Name: cmiShellPath Format: String Value: Name and path of your shell application. For the value field use predefined system environment variables, For example: %SystemRoot%\System32\PrimitiveShell.exe To add your shell component to a dependency group, in Component Designer, under your component, right-click Group Memberships and then choose Add Group Membership. In the Add Component Group Memberships dialog box, expand the Dependencies folder, select the Shell group, and then click OK. Next, add your shell component to a category: in Component Designer, under your component, right-click Group Memberships and then select Add Group Membership. In the Add Component Group Memberships dialog box, expand the Categories folder, navigate to Software>System>User Interface>Shells, and then click OK. Create a directory where you store the executable and manifest files. Create a new repository and associate it with this directory. Create a package so you can manage your shell component efficiently, and associate the repository you just created with the package by adding a group membership to the repository. In the Add Repository Group Memberships dialog box, expand the Packages folder, select the package you just created, and then click OK. Associate the repository with your component by selecting your component in Component Designer, and in the details pane add your newly created repository in the Repository field. The last thing you do is associate the component with the package by adding the package to the component group membership. 180 Chapter 6 Adding Windows Functionality Lesson Summary This lesson discusses the possibility of creating your own customized shell. It describes the process of creating a shell component and associating it to the shell group of components so that it will display as the user interface on a run-time. Quick Check 1. What is the purpose of a shell in an operating system? 2. Is a shell application different from any other application? 3. What makes an application component into a shell component? Quick Check Answers 1. The shell provides the user access to kernel and file system services. 2. No, it is a straightforward Windows application. However it needs sufficient privileges to complete tasks that need authorization. 3. The two main aspects that turn a run of the mill application component into a shell component are that it is based on the Shell Prototype component and it is a member of the shell group. Lesson 2: Configure Multiple User Accounts 181 Lesson 2: Configure Multiple User Accounts Windows Embedded Standard 2009 includes several components for managing user account names, groups, and passwords. The first is the Administrator Account component, which enables you to specify the password for the local Administrator account. You can include only one Administrator Account component in your configuration. Next, you can add the User Account component which enables you to specify the user name, group, and password for a local user account. Your device might call for multiple user accounts. For example, your device may need separate accounts for the operator of the device, and an account for a technician, with separate groups and distinct access privileges. After this lesson, you will be able to: ■ Add an administrator account. ■ Add user accounts. ■ Provide end user access to account management on the device. Estimated lesson time: 25 minutes. Administrator Account When you configure an image in Target Designer and then run a dependency check before you build your configuration, a single Administrator Account component is added to your configuration if Target Designer’s dependency checking is set to operate in Auto-resolve mode. This account name is Administrator and the password is blank. However, if you want to password-protect this account, you must configure the Administrator Account component. In the configuration editor, select the Administrator Account component, and then enter a password string in the Password field in the details pane. Apply strong password rules to the password you enter. You cannot add another Administrator Account component to your configuration; this does not mean that you cannot add other users with administrator privileges, only that an account named Administrator is unique. Multiple User Accounts The User Account component enables you to specify the user name, group, and password for a local user account. You must use a separate User Account component for each user in your configuration. The settings for the User Account component require a user name and password set specifically for it. 182 Chapter 6 Adding Windows Functionality Adding a User Account The User Account component is the last component displayed in the Embedded Enabling Features folder in component browser in Target Designer. In the configuration editor, select the User Account component, select Settings, and then choose the User Account Properties tab in the details pane. In the Username field, enter a username. In the Password field, specify a password for this user. The default is blank. You specify the User Type selection to assign the user to a user group by checking one of the following radio buttons: ■ Administrator Has complete and unrestricted access to the computer/ domain. ■ Power User Can change many system settings and install programs that do not affect Windows system files. ■ User (default) Can operate the computer and save documents, but cannot install programs or change system settings. ■ Guest Has the same access as members of the User group by default, except for the Guest account, which is further restricted. Strong Passwords When you implement a user account strategy, consider the following strong password rules: ■ Strong passwords must be at least seven characters long. Because of the way passwords are encrypted, the most secure passwords are seven or 14 characters long.