Click here to learn
about this Sponsor:
Home  |  News  |  Articles  |  Polls  |  Forum  |  Directory

Keywords: Match:
Using Sysprep in Windows Embedded Standard 2009
by Lynda Allen (Nov. 5, 2008)

Foreword -- This whitepaper highlights a key feature of Microsoft's Windows Embedded Standard 2009 operating system. The new Windows System Preparation Tool (Sysprep) makes it easier to roll out the OS on multiple devices, as the author explains.



Using Sysprep in Windows Embedded Standard 2009
by Lynda Allen


Overview of Sysprep in Windows Embedded Standard

Sysprep modes

Automating Sysprep

Comparing Sysprep and System Cloning Tool



Overview of Sysprep

Sysprep is a tool that usually ships as part of an OEM Preinstallation Kit (OPK). It is a technology that you can use with other deployment tools to install Microsoft Windows operating systems with minimal intervention by an administrator or technician.

Sysprep is typically used during large-scale rollouts when it would be too slow and costly to have administrators or technicians interactively install the operating system on individual computers. This process of creating a master image that can then be customized and deployed to multiple computers is known as cloning.

A master image has all computer-specific information stripped from it, such as the security ID (SID), the computer name, and user settings, by Sysprep. This master image can then be deployed to multiple computers that have basically the same hardware.

Sysprep assigns a unique SID to each cloned image the first time that it starts, and at this point can also apply any number of custom settings, either by prompting the user to specify these settings in a UI, or parsing an answer file included with the image that specifies the settings you want. Each cloned image now runs through a setup process that takes only a few minutes, instead of full setup.

In Windows XP Embedded, we offered an embedded version of cloning technology through the System Cloning Tool. This tool lets developers specify when they want to "seal" the image to create the master image, either at the end of setup, or after some customization. You can also configure some settings offline before the image is deployed and run through setup. This may reduce the amount of customization that must be done after the image has restarted.


Figure 1 -- Settings of System Cloning Tool component
(Click to enlarge)

The Sysprep component can also configure settings. However, it can only do so on a running image, and cannot keep some settings that were configured before Sysprep ran.


Figure 2 -- Settings of Sysprep component
(Click to enlarge)

It must be noted that, although the full functionality of Sysprep is available, we did not modify the Sysprep binaries from the OPK at all. Sysprep in Windows Embedded Standard does not replace the System Cloning Tool, which is still included, enabling another great new feature. The System Center Configuration Manager (SCCM) Operating System Deployment (OSD) functionality enables embedded images to be deployed to the destination development workstation in an enterprise using SCCM.

The "Mini-Setup" mode of Sysprep is used in this scenario to apply certain settings to the destination development workstations, such as joining a domain, setting an administrator password and so on, after they are deployed. Notice that the System Cloning Tool and the Sysprep components cannot be located in the same configuration.

Sysprep Modes

There are two modes that Sysprep can run under: Windows Welcome and Mini-Setup. Windows Welcome is intended for the first user of the development workstation to set it up as they desire. This is not a scenario that seems applicable to an embedded device, where the OEM configures the features and settings, depending on the type of device they are creating and how it will be used in the field.

The Windows Welcome method also uses lots of graphics, and the inclusion of these files in an embedded image has a footprint effect. Mini-Setup, on the other hand, is a shortened GUI-mode setup, and it prompts the end-user only for required user-specific information, such as accepting the Microsoft Software License Terms, entering the product key, and entering the user name and company name.

The Sysprep component in the Windows Embedded Standard database does offer both of the above modes to the developer through the configurable settings in Target Designer. However, the default mode is Mini-Setup.

Sysprep can be run by double-clicking the file Sysprep.exe in the Sysprep folder of an image, or at a command prompt. When Sysprep is started, the Sysprep dialog box opens to let the user choose which function of Sysprep to run: Factory, Audit, or Reseal. Options can also be selected, such as Mini-Setup mode, and Shutdown or Reboot of the development workstation after Sysprep has finished.

Sysprep functions can also be specified with switches at a command prompt. For the purposes of our embedded scenario, enabling SCCM OSD, the only Sysprep function that is currently supported is the Reseal function.


Figure 3 -- Selecting Sysprep Settings for Mini-Setup mode
(Click to enlarge)

After you seal the image, it will restart into the abbreviated setup and prompt you to configure the development workstation through a series of dialog boxes, as illustrated by the following screen shots:


Figure 4 -- Configuring personalized settings during Mini-Setup
(Click to enlarge)



Figure 5 – Configuring user settings
(Click to enlarge)


Automating Sysprep

Sysprep can also be fully automated, so that no user interaction is required to configure the cloned development workstation after it is deployed. This is ideal for an embedded device.

When the Mini mode of Sysprep is selected or the -mini switch is specified at a command prompt, Sysprep looks for Sysprep.inf in the same folder as Sysprep.exe (%Systemdrive%\Sysprep), and parses the development workstation information in the .inf, and then applies the appropriate settings as soon as the cloned development workstation restarts for the first time.

The above process can be automated by running Sysprep using the -quiet switch, so no user interaction is required. If the system does not detect Sysprep.inf in the same folder as Sysprep.exe, or if one of the required settings is missing or incorrect, then Setup will revert to the GUI mode and prompt the user for the information.


Figure 6 – Running sysprep command switches with sysprep.inf file for fully automated process
(Click to enlarge)

The following is a list of the minimal sections that must be in the Sysprep.inf in order to fully automate the Mini Setup process:

[GuiUnattended]
Set OemSkipRegional equal to 1.

[UserData]
FullName
OrgName

[UserData]
ComputerName
ProductID

[GuiUnattended]
AdminPassword

[GuiUnattended]
TimeZone

[Networking]
[Identification]
JoinWorkgroup (join a workgroup)

Additional settings that may be useful for embedded images include the following:

[Unattended]
OemSkipEula

[GuiUnattended]
Autologon
AutoLogonCount
OEMSkipWelcome

Here is an example of a real sysprep.inf file:


Figure 7 -- Example of a sysprep.inf file
(Click to enlarge)

There are many more settings used by Sysprep, but not all of them are supported in Windows Embedded Standard as they are not required for the SCCM OSD scenario. Configuring these additional settings through Sysprep.inf may require additional feature components to be added to the runtime.

You can manually create a Sysprep.inf file using any text editor or you can use the utility provided with the OPK toolkit called Setup Manager (Setupmgr.exe). This file is not owned by a component in the database because it is used on the development workstation and not the destination development workstation, but it can be found in the repository.

Comparing Sysprep and System Cloning Tool

Finally, although the basic functionality of Sysprep and the System Cloning Tool are the same, creating master images, there are some differences in how they can be used in Windows Embedded Standard.

The System Cloning Tool is an embedded enabling feature, and therefore is written specifically for how embedded runtimes are created and deployed. This can be seen in the way that the System Cloning Tool can be configured offline in Target Designer to keep or discard certain settings after cloning.

Sysprep, on the other hand, is a more general purpose tool targeting desktop systems and therefore is not optimized in the same manner for use on embedded devices. Some settings configured offline can be kept after cloning using Sysprep, but some can only be configured after the runtime is deployed.

In conclusion, here is a comparison of the two:

System Cloning Tool

Sysprep

Generate New Computer Name

To keep the same computer name that was specified in Target Designer, set the value "ComputerName" to that computer name in section "[UserData]" of Sysprep.inf. If this value is not set Sysprep will generate a random computer name.

Join/Unjoin Domain

The "[Identification]" section of Sysprep.inf is a required field in fully automated setup. To make sure a domain-joined computer reconnects to the domain, set the values JOINDOMAIN, DOMAINADMIN, DOMAINADMINPASSWORD, or use the "JOINWORKGROUP" value.

Remove/Keep Autologon Settings

Toenable the autologon function, set the values ADMINPASSWORD=*, AUTOLOGON=YES, AUTOLOGONCOUNT=X in section [GuiUnattended] of Sysprep.inf. If these values are not specified, even if theAutologon component is configured in Target Designer, autologon will be disabled.

Remove/Keep Custom Network Settings

Configured network settings such as network protocols and services will not be retained automatically after reseal. These network settings can be configured in sysprep.inf in the [Networking] section.

Remove/Keep Custom User Settings

Configured user settings such as desktop background, visual effects, Start menu and folder options will be retained after reseal. There is no way to remove these custom user settings through Sysprep.inf.


Remove/Keep Mounted Devices

Mounted drives such as a drive mapped to a network share, or a drive letter change will not be retained on reseal. There is no way to configure this in Sysprep.inf.



Copyright (c) 2008 Microsoft Corp. All rights reserved. Reproduced by WindowsForDevices.com with permission.



About the author: Lynda Allen has been a member of Microsoft's Windows Embedded Test team for more than four years, and originally hails from South Africa.



Previous whitepapers devoted to Windows XP Embedded



WindowsForDevices coverage of Windows Embedded Standard



(Click here for further information)


Windows XP for Embedded Applications
This white paper describes the benefits of using Windows XP when developing embedded applications.

A Manager's Guide to Selecting a Mobile Device Operating System
This white paper offers a comparative review of Microsoft Windows CE and Windows Mobile.

Visual Basic 6.0 to .NET Migration
This paper focuses on the methodology and techniques which Infosys (Microsoft Technology Center) has developed for migrating VB 6.0 Applications to .NET. Our approach ensures a smooth, cost effective, and efficient migration.

Mobile Device Security: Securing the Handheld, Securing the Enterprise
This whitepaper identifies security threats to corporate data on mobile devices and details how mobile devices can become a "backdoor" to the enterprise.

Mobile Device Security: The Eight Areas of Risk
It's common knowledge that adding mobile devices to your network increases security risks. There are multiple facets to mobile security, all of which should be paid close attention to. This E-Guide presents a more in depth look into the eight key areas of securing wireless devices.

Quality Assurance and .NET
This paper discusses best practices for functional, regression and load testing of .NET applications.

SCADA Security in Integrated Networks
As businesses leverage their SCADA systems by integrating them into the business networks, they must also assure the security of the SCADA system.

The Advantages of Small Form Factor HMI
HMIs have mutated and changed with new requirements, and they have become more flexible and capable. And while they've been doing that, they've become smaller and more useful.

9 Critical Requirements for Web Application Security
Learn why your Web applications expose dangerous security breaches and what’s required to effectively protect your Web applications and the sensitive information behind them.

 


Got a HOT tip?   please tell us!
Free weekly newsletter
Enter your email...
Click here for a profile of each sponsor:
PLATINUM SPONSORS
(Become a sponsor)

ADVERTISEMENT
(Advertise here)


Updated! The latest Windows-powered...

mobile phones!

other cool
gadgets

HOT TOPICS
Microsoft targets PNDs with new embedded OS
Microsoft tips .NET MF 3.0 highlights
Microsoft previews Windows Embedded Standard
Microsoft offers free Windows CE 6.0 textbook
Microsoft renames embedded operating systems
Microsoft unveils Windows Mobile 6.1
New Atom models target low-cost PCs
REFERENCE GUIDES
Windows Device Showcase
Intro to Windows Embedded
Intro to Shared Source
Real-time Windows Embedded
Windows Embedded books
Join our Windows Embedded discussion forums:
Windows XP Embedded
Windows CE
Windows Mobile


Windows Embedded developer newsgroups
Windows CE
XP Embedded
PocketPC
Smartphone

Microsoft's Windows Embedded resources
Embedded dev center
Mobile dev center
Windows CE tutorials
XP Embedded tutorials
Windows Embedded seminars
Windows Embedded application categories
3rd-party partners


BREAKING NEWS

• Superscalar ARM SoC runs Windows CE
• CE-based nav stack heads for CES
• Windows phone has dual displays
• Cortex-A8 SoC targets netbooks
• Palm "Nova" Linux set for CES debut?
• Editors' retrospective -- Windows-powered Devices in 2008
• Firefox mobile browser alphas released
• Box PC doubles as car computer
• Windows phone has dual active radios
• Windows PMP has dual-core CPU
• COM Express module sports Atom
• "Half-rack" network appliance runs Windows
• Cross-platform NAS runs Windows
• ARM to dominate MIDs?
• Toshiba launches first 512GB SSD


MOST POPULAR (last 90 days)
• "Netbook" uses Intel's Atom N270
• Windows CE takes on Linux in low-end netbooks
• HTC ups Touch resolution
• Microsoft unleashes new embedded OS
• Windows Mobile phone gets 800 x 480 display
• HTC spins WiMAX phone?
• Smart camera sports Atom
• Dual-core AMD netbook gets rave review
• Windows Mobile 7 "delayed"
• GPS phone uses new Marvell "Tavor" chip
MOST POPULAR (Classics from the vault)
Windows XP Embedded USB boot
Troubleshooting Windows XPe's blue screen "Stop 0x0000007B" error
Asus reveals $190 mini notebook
Windows Mobile 6 SDKs available for download
Windows Mobile VPN client plays with Cisco
HTC adds GPS to Windows Mobile Touch line
Microsoft unveils Windows Mobile 6.1
Guide to HTC's Windows Mobile smartphone platforms
• HTC releases Touch Diamond ROM upgrade
Customizing Windows XP Embedded thin clients

Also visit our sister sites:


Sign up for WindowsForDevices.com's...

news feed

Home  |  News  |  Articles  |  Polls  |  Forum  |  Directory  |  About  |  Contact
 

Ziff Davis Enterprise Home | Contact Us | Advertise | Link to Us | Reprints | Magazine Subscriptions | Newsletters
Tech RSS Feeds | White Papers | ROI Calculators | Tech Podcasts | Tech Video | VARs | Channel News

Baseline | Careers | Channel Insider | CIO Insight | DesktopLinux | DeviceForge | DevSource | eSeminars |
eWEEK | Enterprise Network Security | LinuxDevices | Linux Watch | Microsoft Watch | Mid-market | Networking | PDF Zone |
Publish | Security IT Hub | Strategic Partner | Web Buyer's Guide | Windows for Devices

Developer Shed | Dev Shed | ASP Free | Dev Articles | Dev Hardware | SEO Chat | Tutorialized | Scripts |
Code Walkers | Web Hosters | Dev Mechanic | Dev Archives | igrep

Use of this site is governed by our Terms of Service and Privacy Policy. Except where otherwise specified, the contents of this site are copyright © 1999-2008 Ziff Davis Enterprise Holdings Inc. All Rights Reserved. Reproduction in whole or in part in any form or medium without express written permission of Ziff Davis Enterprise is prohibited. Windows is a trademark or registered trademark of Microsoft Corporation in the United States and/or other countries and is used by WindowsForDevices under license from owner. All other marks are the property of their respective owners. WindowsForDevices is an independent publication not affiliated with Microsoft Corporation.