OS Deployment of Windows XP Using WinPE - Best Known Method

60
LANDesk ® Management Suite 8.7 SP2 OS Deployment of Windows XP Using WinPE Best Known Method Revision 1.0 Jared Barneck February 26, 2007

Transcript of OS Deployment of Windows XP Using WinPE - Best Known Method

Page 1: OS Deployment of Windows XP Using WinPE - Best Known Method

LANDesk® Management Suite 8.7 SP2 OS Deployment of Windows XP Using WinPE

Best Known Method

Revision 1.0

Jared Barneck February 26, 2007

Page 2: OS Deployment of Windows XP Using WinPE - Best Known Method

Information in this document is provided in connection with LANDesk® products. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. Except as provided in terms and conditions for such products, LANDesk Software, Inc. and its affiliated entities (“LANDesk”) assume no liability whatsoever, and LANDesk disclaims any express or implied warranty, relating to sale and/or use of LANDesk products including liability or warranties relating to fitness for a particular purpose, merchantability, or infringement of any patent, copyright or other intellectual property right. LANDesk products are not intended for use in medical, life saving, or life sustaining applications. The reader is advised that third parties can have intellectual property rights that can be relevant to this document and the technologies discussed herein, and is advised to seek the advice of competent legal counsel, without obligation of LANDesk. LANDesk retains the right to make changes to this document or related product specifications and descriptions, at any time, without notice. LANDesk makes no warranty for the use of this document and assumes no responsibility for any errors that can appear in the document nor does it make a commitment to update the information contained herein. Copyright © 2007 LANDesk Software, Ltd. All rights reserved. LANDesk, Peer Download, Targeted Multicast, and Trusted Access are registered trademarks or trademarks of LANDesk Software, Ltd. or its affiliated entities in the United States and/or other countries. Avocent is a registered trademark of Avocent Corporation. Other brands and names may be claimed as the property of others.

2

Page 3: OS Deployment of Windows XP Using WinPE - Best Known Method

Table of Contents Introduction ................................................................................ 5 Scope ........................................................................................ 5 Assumptions ................................................................................ 5 Step 1 – Creating a Source Image ...................................................... 6

Sector by Sector Imaging ............................................................. 6 Common Mistakes When Imaging Windows XP with WinPE ...................... 6

Mistake 1 - Using the Wrong Version of Windows XP ......................... 6 Mistake 2 – Building the Image on a Partition that Fills the Entire Drive . 7 Mistake 3 – Installing Applications that Change or Upgrade Often......... 7 Mistake 4 – Installing the LANDesk® Agent on the Source Image........... 7 Mistake 5 – Deploying Images without Using Sysprep ........................ 7

Basic Process for Building a Windows XP Image................................... 7 Step 2 - Creating a WinPE Capture Script ............................................ 9 Step 3 - Configuring the PXE Boot Menu............................................ 12 Step 4 – Configuring and Installing the PXE Representative.................... 13

Pre-configuration of the PXE Representative.....................................13 Pre-configuration Step 1 – Changing the F8 Menu Prompt and Timeout .13 Pre-configuration Step 2 - Configuring Name Resolution in the WinPE

Image ...........................................................................14 Post-configuration Step 3 – Adding Drivers to the WinPE Image ..........15

Installing the PXE Representative ..................................................19 Post-configuration of the PXE Representative ...................................24

Post-configuration - Configuring the Firewall ................................24 Step 5 - PXE Booting to WinPE and Capturing an Image......................... 24 Step 6 - Creating a WinPE OS Deployment Script................................. 30 Step 7 – Adding the OS Deployment Script to the LANDesk® Boot Menu .... 38 Step 8 – Preparing a Workstation to Be Imaged................................... 39

BIOS Configuration ....................................................................39 Naming the Workstation in the Inventory Database .............................39

Step 9 - PXE Booting to WinPE and Deploying the Sysprepped XP Image.... 40 Summary .................................................................................. 42 Appendix A – Troubleshooting the PXE Representative Deployment Script 43 Appendix B – WinPE Troubleshooting ............................................... 44

Troubleshoot Boot Failures ..........................................................44 Opening a Command Prompt and Using Available Tools ........................44 Adding a driver to WinPE ............................................................45

3

Page 4: OS Deployment of Windows XP Using WinPE - Best Known Method

Appendix C – Troubleshooting a WinPE OS Deployment Script ................ 46 OS Deployment Scripts Explained ..................................................46

[VALUES] Section..................................................................46 [OWNER] Section ..................................................................46 [JOBPARAMS] Section.............................................................46 [MACHINES] Section...............................................................47

Sample WinPE Capture Script from 8.7 SP2.......................................47 WinPE Capture Script Dissected ....................................................48 Sample WinPE Deployment Script from 8.7 SP2..................................49 WinPE Deploy Script Dissected......................................................52 Reading Logs Results of an OS Deployment Script ...............................56

Appendix D – Custom Modifications to an OS Deployment Script ............. 56 New Requirement for Making a Custom Modification to an OS Deployment

Script................................................................................56 Adding Commands to the End of an OS Deployment Script ....................57

Appendix E - WinPE and ImageW Feature Matrix................................. 58 Appendix F - ImageW.exe Command Line Switches ............................. 59

4

Page 5: OS Deployment of Windows XP Using WinPE - Best Known Method

Introduction WinPE is a new PXE boot option with LANDesk Management Suite 8.7. Because it is based on Microsoft technology, it requires a license. Contact your LANDesk Sales Engineer to obtain Licensing for WinPE.

WinPE is not XP and it is not Vista, however, it is an operating system and still requires drivers. Drivers built for Windows XP should be valid for WinPE. It is possible that Vista drivers will be valid as well.

Scope This document discusses the use of WinPE for OS Deployment of Windows XP. It will cover the following topics. For best results, read and complete each section in the order listed:

• Creating a Source Image

• Creating a WinPE Capture Script

• Configuring the Boot Menu

• Installing the PXE Representative

• PXE Booting to the WinPE Menu and Capturing an Image

• Creating a WinPE OS Deployment Script

• Adding the Deployment Script to the LANDesk Boot Menu

• Preparing a Workstation to Be Imaged

• PXE Booting to the WinPE Menu and Deploying the Image

Assumptions This document discusses basic administrative tasks involving Management Suite process used for OS Deployment. It assumes that a Core Server is already installed and that a DHCP server is already working in the current environment.

It is assumed that the reader is familiar with the process of installing the necessary operating system and preparing it to be imaged.

The minimum equipment needed is the following three computers:

• Core Server

• PXE Representative

• Test machine: for capturing and deploying an image

However, this document assumes the need for two more machines:

• Separate file server: Machine on which the captured images are written to and stored

5

Page 6: OS Deployment of Windows XP Using WinPE - Best Known Method

• Second test machine: Machine on which the image is deployed

Note: For testing and writing this document, both physical workstations and VMWare 5 virtual machines were tested.

For this document, it is assumed that a single partition Windows XP Sysprepped image is captured and deployed.

Step 1 – Creating a Source Image When building a source image, it is important to understand how the imaging tool works. The imaging tool for WinPE is called Image and the file name for the WinPE (32 bit Windows) version of Image is ImageW.exe.

Sector by Sector Imaging Image is a sector-by-sector hard drive cloning tool. Because it is sector by sector, if the source image is captured on a 40GB drive, it captures data from 40GB of sectors and knows in which sector each bit of data goes. If the image is then deployed to a 20GB drive, it may fail because the destination drive does not have all of the 40GB of sectors needed to deploy the image.

This issue is easily resolved by simply creating a smaller partition on the source drive and leaving the rest of the drive unpartitioned. For example, if the source drive is 40GB and the smallest drive that the image will be deployed to is 15 GB, then create a partition on the 40GB drive that is 10GB to 14GB and leave the rest of the drive unpartitioned. When the image is captured, it will only have 14GB of sectors so the image can be deployed to any drive with 14GB of sectors or more.

Management Suite automatically expands the partition to fill the whole drive, so even if the image was captured on a 14GB partition and deployed to a 40GB drive, the image is laid down initially as a 14GB partition but the partition then is extended to fill the drive and use all free space, as is most commonly desired.

Common Mistakes When Imaging Windows XP with WinPE When creating an image for Windows XP, there are many common mistakes. The following common mistakes should be avoided.

Mistake 1 - Using the Wrong Version of Windows XP Windows XP has retail versions, OEM versions, and Volume License versions, among others. Microsoft only supports imaging when using the Volume License version of Windows. See the following web site for more information: http://www.microsoft.com/licensing/resources/vol/default.mspx

While deploying any version can be done with Management Suite, other administrative tasks are minimized if the correct Volume License version of Windows XP is used.

6

Page 7: OS Deployment of Windows XP Using WinPE - Best Known Method

Mistake 2 – Building the Image on a Partition that Fills the Entire Drive As mentioned earlier, Image is a sector by sector imaging tool. It can only be deployed to a hard drive with the same amount of sectors as the source partition had when the image was captured. Installing Windows XP on a partition that fills the entire drive limits the images ability to deploy drives that may be smaller. The image should be created on a partition that is smaller than the smallest hard drive the image will be deployed to.

Mistake 3 – Installing Applications that Change or Upgrade Often Many applications change or upgrade often and installing such applications on the source image can make the image outdated sooner than desired.

Mistake 4 – Installing the LANDesk® Agent on the Source Image The LANDesk® Agent is an application that changes and upgrades often. The OS Deployment process integrates with Sysprep to automatically install the LANDesk Agent. LANDesk does not support including the LANDesk Agent on a Windows image. Including the LANDesk Agent in the source image can result in problems with duplicate devices and disappearing devices in the database. Also installation and upgrade issues may occur if the agent is already installed.

Mistake 5 – Deploying Images without Using Sysprep Microsoft does not support imaging any of their Operating Systems unless Sysprep is used. See the following Microsoft KB Article. http://support.microsoft.com/?kbid=162001

For this reason LANDesk recommends that when imaging Microsoft Operating Systems, Sysprep should always be used. For more information see the LANDesk KB Article 2502 - LANDesk Sysprep Whitepaper. http://kb.landesk.com/article.asp?article=2502&p=5

Basic Process for Building a Windows XP Image The following steps are a general outline of creating a Windows XP source image. These steps are the minimal steps needed and are not all inclusive.

1. Obtain the Volume License version of Windows XP from Microsoft.

Warning: Do not use an OEM or Retail version of Windows.

2. Begin the Windows XP install.

3. During the Windows XP install process, remove all existing partitions, including the vendor partition.

Warning: When creating an Image in WinPE, the vendor partition may be left on the hard drive but doing so requires additional configuration changes. Both partitions are captured and it is important to remember that the C: drive is partition two as the OEM partition is partition one. Do not attempt to rename a multi-partition image and do not delete the .dim file.

7

Page 8: OS Deployment of Windows XP Using WinPE - Best Known Method

4. Create a partition that is smaller than the smallest drive to which the image will be deployed. Leave the rest of the disk unpartitioned. (Usually 10 GB to 15 GB is sufficient.)

5. Use the default networking components. Do not join a Domain during the installation.

Warning: Joining that domain could result in undesired policies included in the image. Such policies may prevent the automation of the imaging process or result in an unstable image. For best result, make the device a member of a workgroup.

6. Finish the installation of Windows XP.

Warning: If the volume license version of Windows XP was used, the installation does not prompt for activation. If the installation prompts for activation, stop building the image and obtain the volume license version of Windows XP and reinstall.

7. Log on as the local administrator.

8. Make any changes to the Image, including driver installation and software installation of any application that has been chosen to be included in the image.

Warning: It is recommended that most software be installed after the imaging process using Management Suite’s Software Distribution. If software is installed manually on the image, be aware that some software requires access to the installation source during normal runtime or when a new user first logs on. Microsoft Office is an example of such software. Any software that requires access to the installation source should be installed from a network resource that will be available after the image is deployed. Installing such software from a CD is not recommended.

9. Download the correct version of Sysprep and run it. Check the Mini-Setup checkbox and choose to shut down the machine when Sysprep finishes. For more information see the LANDesk KB Article 2502 - LANDesk Sysprep Whitepaper. http://kb.landesk.com/article.asp?article=2502&p=5

Warning: Failure to use Sysprep may result in a windows environment not supported by Microsoft. http://support.microsoft.com/?kbid=162001

10. Leave the machine turned off.

11. The Machine is now ready to be captured but the actual capture process will not occur until Step 5 - PXE Booting to WinPE and Capturing an Image. Please continue with Step 2 - Creating a WinPE Capture Script before moving on. Each step should be completed in order.

8

Page 9: OS Deployment of Windows XP Using WinPE - Best Known Method

Step 2 - Creating a WinPE Capture Script How to create a WinPE Capture Script:

1. Open the Management Suite Console and click Tools | Distribution | OS Deployment.

2. Right-click My Scripts and click New Windows PE Configuration. The Create Windows PE Image window appears.

3. Click the Capture Image radio button (in this case it is already selected) and click OK. The Capture Windows PE Image window appears.

4. Type WinPE Capture in the Name field.

5. Type This captures all partitions on the first drive in the Description field.

9

Page 10: OS Deployment of Windows XP Using WinPE - Best Known Method

6. Click to highlight Credentials. The Credentials window appears.

7. Type the domain name\user account in the Domain and user name field.

8. Type the password in the Password field.

9. Retype the password in the Confirm password field.

Note: This account must have write access to both shares used during the OS Deployment processes.

10. Click to highlight Image Information. The Image information window appears.

11. Verify that LANDesk is displayed in the Image type field.

Note: Other options are available but for this document, only the LANDesk imaging tool is demonstrated.

12. Type the path to the share where the image will be captured to in the Enter the UNC path directory to store the image file field.

13. Verify that the server name uses a value that can be resolved to an IP address in WinPE. The server’s hostname, FQDN, or IP Address can be used here.

Note: This user account entered on the Credentials windows must have write access to this share. On this server, go to Properties of this shared folder and verify access is given to this user account. Access

10

Page 11: OS Deployment of Windows XP Using WinPE - Best Known Method

should be given on the Sharing tab by clicking Permissions and also under the Security tab.

14. Type the path to the ImageW.exe file and include the file name in the Enter the UNC path to the imaging application field.

15. Verify that the server name uses a value that can be resolved to an IP address in WinPE. The server’s hostname, FQDN, or IP Address can be used here. \\CoreServer\ldmain\osd\imaging\imagew.exe

Note: Write access is needed to this share.

16. Click Save. The command line for the imaging tool appears in the LANDesk Management Suite window.

Note: The process for capturing and image using Image requires backall.bat, ImageAll.exe, and ImageW.exe. Notice the command line actually calls backall.bat and not ImageW.exe directly.

11

Page 12: OS Deployment of Windows XP Using WinPE - Best Known Method

17. Click OK. The desired switches are preconfigured to capture the all partitions on the first drive. For this example, do not make any changes. The Script is now created.

Step 3 - Configuring the PXE Boot Menu The LANDesk PXE Boot Menu is a list of scripts that are available for imaging after a PXE boot. To configure the PXE Boot Menu, add folders to the menu, and click and drag scripts to these folders.

How to configure the PXE Boot Menu:

1. From the Network View, click Tools | Distribution | PXE Boot Menu.

2. Right-click PXE Boot Menu and click New.

3. Name the folder WinPE.

4. From the Network View, click Tools| Distribution | OS Deployment.

5. Click and drag the script to the PXE Boot Menu window and drop the script on top of the new WinPE folder. The PXE Boot Menu should now look as depicted in the following figure:

6. Click the Update toolbar icon (the last icon on the right) to commit the

changes. The PXE Boot Menu is now configured.

12

Page 13: OS Deployment of Windows XP Using WinPE - Best Known Method

Step 4 – Configuring and Installing the PXE Representative A PXE Representative is a bootp server, which is similar to a DHCP server except it returns instructions for network booting instead of IP Address information. See RFC 951 for more information on the bootp protocol. http://www.ietf.org/rfc/rfc951.txt

In order for a device to PXE boot, the DHCP request from a workstation must reach both the PXE Representative and the DHCP server. Usually the PXE Representative is a workstation on the same subnet as the workstation that is to be PXE booted.

For this quick start guide, choose a computer that is on the same subnet as the machine being captured.

Note: The PXE Rep can be installed on Windows 2000 Professional, Windows 2000 Server, Windows XP, Windows 2003 Server, and Windows Vista. The LANDesk Agent must already be installed to the device.

Pre-configuration of the PXE Representative

Pre-configuration Step 1 – Changing the F8 Menu Prompt and Timeout How to make pre-configuration changes to the PXE Representative:

1. From the Network View, click Configure | Services.

2. Click the OS Deployment tab.

3. Make any changes to the PXE boot options by changing the Timeout and/or the Message fields.

Note: These modifications do not take place until the PXE Representative is installed. If modifications are made after the PXE Representative is installed, the PXE Representative must be reinstalled.

13

Page 14: OS Deployment of Windows XP Using WinPE - Best Known Method

4. Click OK when finished.

Pre-configuration of the PXE Representative is complete.

Pre-configuration Step 2 - Configuring Name Resolution in the WinPE Image Name resolution issues can be resolved by properly configuring the DNS and WINs servers as well as properly configuring the DHCP server options; however, as these servers cannot always be accessed for configuration changes, the name resolution issues can be resolved with a hosts file inside the WinPE boot image. If DNS, WINs, and DHCP servers are properly configured, skip this step.

To make sure that the Core Server name (and any other server name) can be resolved, a hosts file can be created and added to WinPE image (LDVPE1.img) before the PXE Representative is installed. The WinPE image located on the Core Server here:

C:\Program Files\LANDesk\ManagementSuite\LANDesk\Vboot\LDVPE1.img

It can also be accessed via the ldmain share.

\\CoreServer\ldmain\LANDesk\vboot\LDVPE1.img

14

Page 15: OS Deployment of Windows XP Using WinPE - Best Known Method

How to add a hosts file to the WinPE image:

1. Before making any changes to the LDVPE1.img, always back it up. Make a copy of LDVPE1.img called LDVPE1.img.original.

2. Create a hosts file using a text editor. Make sure it is named hosts with no file extension. A sample two line hosts is demonstrated below.

192.168.0.1 CoreServer CoreServer.Domain.com 192.168.0.1 ImageServer ImageServer.Domain.com

3. Copy the hosts file to the ManagementSuite\LANDesk\Vboot directory on the Core Server.

4. On the Core Server, open a command prompt.

5. In the command prompt, change to the ManagementSuite\LANDesk\VBoot directory. cd C:\Program Files\LANDesk\ManagementSuite\LANDesk\VBoot

6. From the Vboot directory type the following command to copy the hosts file into the LDVPE1.img. copyfile.exe ldvpe1.img hosts i386\system32\drivers\etc\hosts

7. Drag the created hosts file into this folder inside WinImage.

8. When prompted to inject the file, click Yes.

9. Save the modified LDVPE1.img file and close WinImage.

Post-configuration Step 3 – Adding Drivers to the WinPE Image WinPE is an operating system similar to Windows XP and Windows Vista. All operating systems need drivers to interact with hardware. In order to properly interact with drive controllers and network cards, additional drivers may need to be added to the WinPE image. LANDesk 8.7 Management Suite Service Pack 2 or later is required to add drivers to the WinPE image using the LANDesk Console.

The WinPE image located on the Core Server here:

C:\Program Files\LANDesk\ManagementSuite\LANDesk\Vboot\LDVPE1.img

It can also be accessed via the ldmain share.

\\CoreServer\ldmain\LANDesk\vboot\LDVPE1.img

How to add a driver to the WinPE image:

1. Before making any changes to the LDVPE1.img, always back it up. Make a copy of LDVPE1.img called LDVPE1.img.Feb21-2007.

Warning: Do not overwrite the LDVPE1.img.original created in the previous step. A separate backup file should be created. It is a

15

Page 16: OS Deployment of Windows XP Using WinPE - Best Known Method

good idea to add the date each time this file is backed up and maintain multiple backups at different stages of modification.

2. From the Network View, click Tools | Distribution | OS Deployment.

3. Click the Add Driver toolbar icon.

The Add a driver to Windows PE image window appears.

4. The path should already appear or a new patch to the LDVPE1.img file can be entered. Use the direct path if working on the Core Server: C:\Program Files\LANDesk\ManagementSuite\LANDesk\Vboot\LDVPE1.img or use the UNC path if using a Remote Console: \\CoreServer\ldmain\LANDesk\vboot\LDVPE1.img If adding a driver for a drive controller, such as a SCSI or SATA controller, click the first radio button: OEM driver for SCSI or SATA hard drive.

16

Page 17: OS Deployment of Windows XP Using WinPE - Best Known Method

If adding a driver for a network card, or any hardware other than a driver controller, select the second radio button: Non-OEM driver.

5. For this example, the Marvell Yukon network card is added. Click to select Non-OEM driver.

6. Click Next.

7. Enter the Path to the driver’s .inf file or browse to it.

8. Enter the Path to the driver’s .sys file or browse to it.

9. If the driver depends on other files, click Add.

10. Browse to the additional files that the driver depends on. Select all the additional files that are needed. Use Ctrl + click to highlight multiple files.

11. Once the files are highlighted, click Open. The files are added to the Files this driver depends on list.

12. Click Next.

17

Page 18: OS Deployment of Windows XP Using WinPE - Best Known Method

The following window prompts for Free space to leave in image after adding this driver. The LDVPE1.img file must contain free space in order to function properly.

13. For the Free space to leave in image after adding this driver, enter 10.

14. Click Finish.

18

Page 19: OS Deployment of Windows XP Using WinPE - Best Known Method

15. Repeat this process for each driver that must be added.

Pre-configuration of the PXE Representative is complete.

Installing the PXE Representative The PXE Representative provides the needed information for a device to PXE boot. By booting from PXE instead of from the hard drive, the hard drive will not be in use allowing the imaging tool to access it without having to encounter files that are in use or locked.

The PXE Representative software should be installed on a LANDesk Agent that can be a workstation or server that is on the same subnet as the workstation that is to be PXE booted. The PXE Representative is made to install on the following version of Windows: XP Pro, 2000 Pro, 2000 Server with SP4, 2003 Server.

Warning: Do not install the PXE Representative on the Core Server or a DHCP server. Installing the PXE Representative on the Core Server is not recommended. It can be done for lab and training environments but is not supported in a production environment. Installing the PXE Representative on a DHCP server can be done but requires advanced configuration not documented here.

How to install the LANDesk PXE Representative:

1. From the Network View, click Tools | Distribution | OS Deployment.

2. Click to highlight All Other Scripts.

3. Right-click PXE Representative Deployment and click Schedule.

This automatically creates a Scheduled Task to deploy the PXE Representative.

19

Page 20: OS Deployment of Windows XP Using WinPE - Best Known Method

4. Click and drag the LANDesk Agent workstation from All Devices in the Network View and drop it on the PXE Representative Deployment task.

5. The device now shows up as a target for the task with a status of Waiting and a result of Not Specified.

20

Page 21: OS Deployment of Windows XP Using WinPE - Best Known Method

6. Right-click the PXE Representative Deployment task and click Start now.

LANDesk installs the PXE Representative software on the device.

Note: On the Core Server, a Custom Job Processing window displays the target device and the current status of each line in the script.

21

Page 22: OS Deployment of Windows XP Using WinPE - Best Known Method

If the task was started from a Remote Console, similar information can be seen by right clicking on the PXE Representative Deployment task and clicking Current Status. The following window is displayed.

22

Page 23: OS Deployment of Windows XP Using WinPE - Best Known Method

7. Once completed successfully the task displays the status of Done and a result of Successfully completed installation of package.

The PXE Representative is now installed.

Note: If an error occurs, go to Appendix A – Troubleshooting the PXE Representative Deployment.

23

Page 24: OS Deployment of Windows XP Using WinPE - Best Known Method

Post-configuration of the PXE Representative Once the PXE Representative is deployed, the following post-configuration steps may need to be performed.

Post-configuration - Configuring the Firewall If the PXE Representative is installed to an operating system with a firewall running, (such as Windows XP Service Pack 2) then the firewall must be opened to allow certain UDP ports.

By registering the following two files associated with the PXE Representative services with the Windows firewall, automatically allows the ports used by those services:

• C:\Program Files\LANDesk\PXE\System\PXEMFTP.exe

• C:\Program Files\LANDesk\PXE\System\PXESvc.exe

Note: As of 8.7 SP2, these files are registered with the firewall when the PXE Representative is installed. Previous versions do not automatically register with the firewall.

For a complete list of UDP ports used, see the following table:

UDP Port 67 Client PXE Rep Bootp

UDP Port 68 PXE Rep Client Bootp response

UDP Port 69 Client PXE Rep TFTP (Not MTFTP)

UDP Port 1758 PXE Rep Client PXE MFTP Client port

UDP Port 1759 Client PXE Rep PXE MFTP Server Port

UDP Port 4011 Client PXE Rep Unicast bootp. (Only used if the DHCP server tells the client to use it.)

Step 5 - PXE Booting to WinPE and Capturing an Image The first step to PXE boot to WinPE is to configure the BIOS of a workstation that supports PXE. Most but not all computers manufactured in the past few years support PXE booting, however, PXE booting is not always enabled in the BIOS. It is required that the BIOS be altered to enable PXE booting and it is recommended that PXE booting be first in the boot order.

Note: When ordering new workstations from a hardware vendor, request that the BIOS come preconfigured with these settings on all newly arriving computers.

24

Page 25: OS Deployment of Windows XP Using WinPE - Best Known Method

Do not try to PXE boot the PXE Representative. The PXE Representative must be installed on a device other than the device that is to be PXE booted.

How to PXE boot a workstation and run the WinPE Capture script:

1. Configure the BIOS to have PXE booting enabled.

2. Set the boot order to attempt to boot using PXE first.

3. The next time the machine boots it will attempt to PXE boot as shown below.

Note: Different network cards may have a slightly different output than that shown below.

If the PXE Representative was correctly installed on the same subnet as this device and a DHCP server is available, a prompt to press F8 is displayed. By default this prompt is displayed for the optimal setting of four seconds.

4. Press F8 before the prompt times out. The following PXE menu appears.

Note: This menu is called the PXE Menu or F8 Menu and should not to be confused with the LANDesk Boot Menu which appears later.

25

Page 26: OS Deployment of Windows XP Using WinPE - Best Known Method

Note: If this menu does not appear, PXE troubleshooting should be done. If needed, contact LANDesk support.

5. Scroll down and select LANDesk(R) WinPE Menu.

6. Press Enter. LDVPE1.img will begin downloading.

26

Page 27: OS Deployment of Windows XP Using WinPE - Best Known Method

Once downloaded the device begins to boot to WinPE.

WinPE then loads and starts running through the Factory Preinstallation process.

The IP address is obtained from DHCP and connection to the Core Server is verified.

27

Page 28: OS Deployment of Windows XP Using WinPE - Best Known Method

When the booting process completes, the PxeMenu screen appears.

Note: If the previous menu does not appear go to Appendix B – WinPE Troubleshooting.

7. Click to expand PXE Boot Menu.

8. Click to expand WinPE. The WinPE Capture script appears in the list.

28

Page 29: OS Deployment of Windows XP Using WinPE - Best Known Method

9. Double click WinPE Capture. The PxeMenu closes and WinPE enters a state where it is waiting for commands to be sent to it from the Core Server. Nothing more is displayed to the screen until the imaging process begins.

Note: If the imaging process does not begin, see the LANDesk KB Article 1889 – Troubleshooting the PXE Boot Menu hanging at "Waiting for Command". http://kb.landesk.com/article.asp?article=1889&p=5

If no errors occur, the imaging process begins. The following DOS box appears.

Immediately after the DOS box, the LANDesk® OS Deployment (1.63) window appears and the image begins to capture.

29

Page 30: OS Deployment of Windows XP Using WinPE - Best Known Method

The progress bar displays the progress until the capture is successful. The computer is rebooted and the image is successfully captured.

This step to PXE boot a workstation and run the WinPE Capture script is now complete.

Step 6 - Creating a WinPE OS Deployment Script How to create a WinPE OS Deployment script:

1. From the Network View, click Tools | Distribution | OS Deployment.

2. Right-click My Scripts and click New Windows PE Configuration. The Create Windows OS Deployment Script window appears.

30

Page 31: OS Deployment of Windows XP Using WinPE - Best Known Method

3. Click the Deploy Image radio button.

4. Click OK. The Deploy Windows Image window appears.

5. Type WinPE Deploy Sysprepped XP in the Name field.

6. Type This script deploys a Sysprepped Windows XP image in the Description field.

31

Page 32: OS Deployment of Windows XP Using WinPE - Best Known Method

7. Click to highlight Methods and credentials. The Methods and credentials window appears.

8. Click to place a checkmark in the Image uses Sysprep checkbox.

9. Enter the credentials for the UNC authentication to the shares.

32

Page 33: OS Deployment of Windows XP Using WinPE - Best Known Method

10. Click to highlight Image type and path. The Image type and path window appears.

11. Enter the UNC path to the image that was just captured. Include the name of the image in the path. Make sure the server name uses a value that can be resolved to an IP Address in WinPE. The server’s hostname, FQDN, or IP Address can be used here.

12. Enter the path to the imaging tool. Make sure the server name uses a value that can be resolved to an IP Address in WinPE. The server’s hostname, FQDN, or IP Address can be used here.

13. Click to expand Sysprep Options. The Sysprep Options window appears. By default the selected Windows product is Windows XP and the Sysprep.inf file is in the correct location: c:\Sysprep\Sysprep.inf.

33

Page 34: OS Deployment of Windows XP Using WinPE - Best Known Method

In this example advanced multiprocessor options are not used. No changes need to be made on this window.

14. Under Sysprep options, click to highlight Image settings. The Image settings window appears.

15. Type a valid volume license key in the Volume license key field.

Note: The depicted key is not a valid Volume license key.

16. If a password was set for the administrator account of the captured image, enter that password where indicated. If the administrator password was blank on the source image, leave this field blank.

17. Type Sales Team in the Name field.

18. Type LANDesk Software, Inc. in the Organization field.

Note: The Name value is not the computer name and cannot be the same as the computer name.

34

Page 35: OS Deployment of Windows XP Using WinPE - Best Known Method

19. Click to highlight Network credentials. The Network credentials window appears.

20. If workstation should join the domain, click the Domain radio button and enter the Domain user name and Domain password.

21. If a workstation should join a specific Organization Unit in Active Directory, check the Add device to an Active Directory OU check box and enter the OU name. Otherwise leave this box unchecked. This field is not used in this example.

22. Click to highlight Naming convention. The Naming convention window appears.

23. By default the First attempt to get and use existing computer names from the Inventory database checkbox is checked. This is based on the MAC Address. Only uncheck this if the workstation exists in the LANDesk inventory database but is to receive a different name.

35

Page 36: OS Deployment of Windows XP Using WinPE - Best Known Method

24. Type the naming convention to use if the device is not in inventory or if the inventory is not going to be used.

Note: In the example, Sales-nnn is used. This causes each machine to be named Sales-001, Sales-002, Sales-003, etc. This number value is stored on the Core Server in the registry and can be manually changed. The registry key is HKLM\Software\Intel\LANDesk\LDWN\CustJob\Sales-nnn and the DWORD name is ComputerNameRuleCount.

25. Click to highlight LANDesk agent. The LANDesk agent window appears.

26. Type \\CoreServer\LDLOGON in the UNC patch to directory containing WSCFG32.EXE field.

27. Enter the appropriate domain and user name in the Domain and user name field.

36

Page 37: OS Deployment of Windows XP Using WinPE - Best Known Method

The LDLOGON share will be accessed by the commands in the GUIRunOnce section of the Sysprep.inf. These commands process using the workstations local administrative account not an Active Directory account, so the share may not be accessible without credentials.

28. Type the password that has access to the LDLOGON share in the Password field.

29. Retype the password in the Confirm password field.

30. Click Save. The auto-generated command line to deploy the image is displayed.

37

Page 38: OS Deployment of Windows XP Using WinPE - Best Known Method

Note: Notice that ImageW.exe is called in this example instead of Restall.bat. If a multi-partition image were being deployed, Restall.bat would be called instead of ImageW.exe.

31. Click OK.

The Deploy script is now created and should be displayed in the Operating system deployment window under My Scripts.

Step 7 – Adding the OS Deployment Script to the LANDesk® Boot Menu How to add the OS Deployment script to the PXE Boot Menu:

1. From the Network View, click Tools | Distribution | OS Deployment.

2. Click and drag the new WinPE Deploy Sysprepped XP script to the PXE Boot Menu window and drop the script on top of the WinPE folder in the PXE Boot Menu. The PXE Boot Menu should look similar to the following figure.

3. Click the Update toolbar icon (the last icon on the right) to commit the changes.

The PXE Boot Menu is now configured.

38

Page 39: OS Deployment of Windows XP Using WinPE - Best Known Method

Step 8 – Preparing a Workstation to Be Imaged Preparing a workstation to be imaged involved the following two steps.

• Configuring the workstation’s BIOS to enable PXE booting (BIOS may already be configured).

• (Optional) Importing the workstation’s MAC Address and computer name into the Inventory database.

This first is required, but the BIOS may already be configured.

The second step is optional, but recommended as it saves a lot of man hours used to rename computers if the computers are named correctly by the imaging process.

BIOS Configuration If the workstation is bare-bones, it is required that the BIOS be configured to enable PXE booting, and it is recommended that PXE booting be first in the boot order.

If the workstation is coming from a third party vendor, a request can be made to the vendor to set the BIOS settings so that PXE is enabled and that PXE is first in the boot order.

Naming the Workstation in the Inventory Database Management Suite integrates with Sysprep to provide the option to name the workstation the same name that it already has in the Inventory database. This integration is done based on the MAC address.

If the computer is not in the database, that is ok. The workstation is named according to the configuration provided on the Naming Convention window of the Sysprep section when creating a script to deploy and image. See Step 6 - Creating a WinPE Deployment Script, specifically sub-steps 20-22.

Whether the workstation is bare-bones, or a pre-configured workstation from a vendor, the workstation can be manually entered into the database, matching the desired computer name with the MAC address.

Manually entering devices in the Management Suite Inventory database can be done quickly using csvImport.exe. For more information, see the LANDesk KB Article 2770 – Using the CSVImport Utility. http://kb.landesk.com/article.asp?article=2770&p=5

When purchasing new workstations from a vendor, the MAC addresses can be requested prior to receiving the new workstations. A .csv file can be created with the MAC address, the computer name, and any other desired value. csvImport.exe can read this .csv file and allow these devices to be entered into the LANDesk database.

39

Page 40: OS Deployment of Windows XP Using WinPE - Best Known Method

Once the workstation’s MAC address and computer name are entered into the Inventory database, the workstation is automatically given the proper name after deploying a Sysprepped image.

Step 9 - PXE Booting to WinPE and Deploying the Sysprepped XP Image How to deploy the Sysprepped XP image:

Note: Since in Step 5 - PXE Booting to the WinPE Menu and Capturing an Image a PXE boot to the WinPE Menu has been demonstrated, the steps and screenshots are not be repeated.

1. PXE boot the workstation.

2. From the F8 Menu, select the LANDesk® WinPE Menu and press Enter to PXE boot to WinPE. After the device boot to WinPE, the PxeMenu is deplayed.

3. From the PxeMenu in WinPE, click to expand PXE Boot Menu.

4. Click to expand WinPE.

5. Click to highlight the WinPE Deploy Sysprepped XP script and press Enter.

The PxeMenu closes and WinPE enters a state where it is waiting for commands to be sent to it from the Core Server. Nothing more is displayed to the screen until the imaging process begins.

6. The imaging process should begin.

Note: If the imaging process does not begin, see the LANDesk KB Article 1889 – Troubleshooting the PXE Boot Menu hanging at "Waiting for Command". http://kb.landesk.com/article.asp?article=1889&p=5

If no errors occur, the imaging process begins. The following DOS box appears.

40

Page 41: OS Deployment of Windows XP Using WinPE - Best Known Method

The imaging process continues and displays a progress bar until it completes.

WinPE returns to the state where it is waiting for commands from the Core Server.

Any tasks that must occur after the image is deployed, but before the device is rebooted, occur now.

These tasks include dynamically setting the computer name in the Sysprep.inf, injecting the Sysprep.inf file into the newly imaged hard drive, and expanding the partition to fill the entire drive.

This screen may flash as each command completes.

41

Page 42: OS Deployment of Windows XP Using WinPE - Best Known Method

Once these tasks are complete, the device reboots.

As the machine boots back up, it will do the following automatically:

• Run through mini-setup. This uses the Sysprep.inf file to automatically name the computer, join it to the correct domain and OU, enable autologon, configure the GUIRunOnce commands, and reboot again.

• The Sysprep folder is deleted by the Sysprep process which is important as the Sysprep.inf contains usernames and password in clear text.

• Automatically logon as the local administrator.

• Run the GUIRunOnce commands. LANDesk adds four commands to the GUIRunOnce by default. For security, it is important to note that while these commands run, the machine is not accessible.

− The first of these commands runs an ldsleep.exe command to allow the services to finish loading.

− The second commands maps a drive the LDOGON share on the Core Server.

− The third command installs the LANDesk Agent, without starting any LANDesk services, and sets the device to reboot.

− The fourth command disconnects the mapped drive.

• Reboot (caused by the LANDesk Agent installation). This reboot is important for security to prevent the machine from remaining logged in as the local administrator.

• Boot up and load the LANDesk services.

• Run any extra commands added to the end of the OSD Script.

• Run any task configured to run in the LANDesk Agent using the Local Scheduler services, including and inventory scan, Policy-based delivery (Software Distribution), and/or a Security Scan.

The imaging process is now complete.

Summary In this quick start guide, the following steps should have been completed in order.

• Creating a Source Image

• Creating a WinPE Capture Script

• Configuring the Boot Menu

• Installing the PXE Representative

• PXE Booting to the WinPE Menu and Capturing an Image

42

Page 43: OS Deployment of Windows XP Using WinPE - Best Known Method

• Creating a WinPE OS Deployment Script

• Adding the Deployment Script to the LANDesk Boot Menu

• Preparing a Workstation to Be Imaged

• PXE Booting to the WinPE Menu and Deploying the Image

Appendix A – Troubleshooting the PXE Representative Deployment Script In order to troubleshoot the WinPE Capture script an understanding of the script is needed.

The following is an example script.

; This file was generated by Desktop Manager [MACHINES_NT] REMEXEC0=MsiExec.exe /q /X{F238CE99-6614-4072-9D20-1D2FA7ED951A} REMEXEC1=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/ldvpe1.img" REMEXEC2=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/ldlinux.img" REMEXEC3=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/ldlogon/provisioning/windows/prov_startnet.cmd" REMEXEC4=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/ldlogon/provisioning/windows/prov_winnt.sif" REMEXEC5=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/ldlogon/provisioning/linux/WinPE.default.cfg" REMEXEC6=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /p="http://%CUSTJOBHOSTIP%/landesk/files/osdrep.msi" /msi /N /An /Ac /g="{F238CE99-6614-4072-9D20-1D2FA7ED951A}" REMEXEC7=<qt/>%LDMS_CLIENT_DIR%\LDISCN32.EXE<qt/> /NTT=%CUSTJOBHOSTIP%:5007 /S="%CUSTJOBHOSTIP%" /F /SYNC /NOUI [MACHINES_95] SETSTATUS=1240, ERR [OWNER] TYPE=OSDOTHERS

The [Machines_NT] Section contains the remote execute (REMEXEC) commands. Only Windows NT, 2000, XP, 2003, and Vista are considered NT machines. The remote executes are skipped on other operating systems.

REMEXEC0 uninstalls a previously installed PXE Representative.

43

Page 44: OS Deployment of Windows XP Using WinPE - Best Known Method

REMEXEC1 through REMEXEC5 downloads the boot image files needed for the PXE Representative installation.

REMEXEC6 downloads and runs the OSDRep.msi, which is the PXE Representative installer.

REMEXEC7 runs and inventory scan.

The [MACHINES_95] section is only processed if the workstation’s OS is Windows 95/98/ME. The PXE Representative is not supported on such operating systems and the deployment is forced to fail using SETSTATUS.

The [OWNER] section is used by the LANDesk Console and is not explained here.

Common failures may occur if the PXE Representative does not properly get uninstalled by the first line.

Appendix B – WinPE Troubleshooting WinPE is an environment similar to Windows XP but stripped down to only include essential functionality. Many of the processes used to troubleshoot Windows XP can be used when troubleshooting WinPE.

Almost all troubleshooting begins with opening a command prompt and running tools that are available to WinPE.

Troubleshoot Boot Failures If WinPE fails to download, fails to boot, or reboot during the boot up process, verify the following:

1. The workstation has the minimum of 256 MB of RAM available. Some workstations may require more than 256 MB of RAM.

Note: Be aware that some BIOSes, memory can be allocated to the video card. If a workstation has 256 MB of RAM but 64 MB is allocated to the video card, then only 192 MB is available.

2. Verify that the latest service pack has been applied to the Core Server and the PXE Representative has been reinstalled since applying the service pack.

3. Verify that at least 4 MB of space is available in the WinPE image. To do this, use the Resize the Windows PE image toolbar icon in the LANDesk Console.

Opening a Command Prompt and Using Available Tools The following is a list of possible troubleshooting steps.

1. To open a command prompt click Go | New Console

2. To verify that the network card was detected, type the following in the command prompt:

44

Page 45: OS Deployment of Windows XP Using WinPE - Best Known Method

ipconfig

3. To verify that the drive was detected, type the following in the command prompt: diskpart This enters the DISKPART> prompt. At the DISKPART> prompt type the following: list disk

4. To open Task Manager type the following in a command prompt: taskmgr.exe

5. To map a drive, type the following in a command prompt: net use * \\server\share /user:Domain\user password

6. To test connectivity to the Core Server, type the following in a command prompt: ping CoreServer

7. To see what ports are open, type the following in a command prompt: netstat –a

Other tools are available by default and even more can be added or launched from a network share.

Adding a driver to WinPE If WinPE boots but does not load the driver for the drive controller or network card, a driver may need to be added. In some rare cases the video adapter driver is needed.

To add a driver to WinPE, see Post-configuration Step 3 – Adding Drivers to the WinPE Image earlier in the document or see KB Article 3469 - How to Add Drivers to the WinPE boot image. http://kb.landesk.com/article.asp?article=3469&p=5

Be aware that LANDesk uses a Microsoft’s WinPE environment based off of Windows 2003 SP1 Server. LANDesk does not build or develop WinPE. LANDesk does not build or develop drivers for WinPE. The drivers are developed by the hardware vendor and usually are the same drivers for Windows XP/2003.

Some workstations have been seen to hang after booting when loading the network card due to an IRQ conflict. If adding a new network card driver does not resolve this issue, the hardware vendor need to be contacted. This issue is

45

Page 46: OS Deployment of Windows XP Using WinPE - Best Known Method

related to the way IRQs are used when booting WinPE over the network. Such issues cannot be resolved by LANDesk. Workarounds include disabling the problematic network card and using a different network card or using the BIOS to force the network card to use a different IRQ.

Appendix C – Troubleshooting a WinPE OS Deployment Script The best method to troubleshoot a failing WinPE OS Deployment script is to comment out the last line that reboots the workstation. Commenting this line out allows the script to process but leaves the workstation in the WinPE environment. The command prompt can be accessed and the failing command can be entered manually and tested.

OS Deployment Scripts Explained Capture scripts are in the standard INI file format in that they have sections that begin with headers in square brackets, [].

In this script there are four sections:

• [VALUES]

• [OWNER]

• [JOBPARAMS]

• [MACHINES]

Under each section is a property with a value.

Property=Value

[VALUES] Section The [VALUES] section is for use when editing the script in the Management Suite Console. When a script is edited, the values in the Console are derived from those in the [VALUES] section. Each value corresponds to a field in the GUI.

[OWNER] Section The [OWNER] section is mostly for use by Management Suite Core Server as well as the LANDesk Boot Menu.

If the script is to be edited manually, add CREATEMANUALLY=TRUE to this section.

[JOBPARAMS] Section This section is for settings that are global for the entire custom script. For example, ABORT_ON_CMD_FAILURE=1 affects all lines not just one. It means that if any line in the script fails, the entire task fails and the task aborts.

46

Page 47: OS Deployment of Windows XP Using WinPE - Best Known Method

[MACHINES] Section This section contains the tasks that are to be run on the Machine.

Before troubleshooting either an OS Deployment capture or a deploy script, an understanding of the script is necessary.

Sample WinPE Capture Script from 8.7 SP2 [VALUES] Task=7 ScriptName=WinPE Capture ScriptDescription=This captures all partitions on the first drive FallBackNIC= UseFallBackNIC=FALSE ImageUserName=admin ImageDomain=Domain.com ImagePassword=1053C9FC81E60EEC3DF260F1E5A ImageToolType=5 ImageUNC=\\ImageServer\images ToolUNC=\\CoreServer\ldmain\osd\imaging\imagew.exe ImageToolCmd=RunBatch -1 H:\osd\imaging backall.bat 0 i:\%Computer - Device Name{6}%, STATUS FACILITY=3510, SYNC [OWNER] GUID=7bb9cd9d-bb3a-4f45-8a1e-b1fbdd088625 OSDPLUG=TRUE DESCRIPTION=This captures all partitions on the first drive NAME=WinPE Capture TYPE=WinPE [JOBPARAM] ABORT_ON_CMD_FAILURE=1 TASK_COMPLETION_ENABLED=FALSE [MACHINES] REMEXEC0=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/bootfile.exe" REMEXEC1=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/tlibr16.dll" REMEXEC2=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/tlibr32.dll" REMEXEC3=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/lddefrag.exe" REMEXEC4=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/cicfgmgr.vxd" REMEXEC5=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/cindis.vxd" REMEXEC6=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/copyfile.exe" REMEXEC7=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/winbom.ini" REMEXEC8=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/ldvpe0.img"

47

Page 48: OS Deployment of Windows XP Using WinPE - Best Known Method

REMEXEC9=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /dest="C:\ldvpe1.img" /p="http://%CUSTJOBHOSTIP%/landesk/vboot/ldvpe1.img" REMEXEC10=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/tokreplw.exe" REMEXEC11=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /dest="%LDMS_CLIENT_DIR%\ldiscan.cfg" /p="http://%CUSTJOBHOSTIP%/landesk/vboot/guid.pds" REMEXEC12=<qt/>%LDMS_CLIENT_DIR%\tokreplw.exe<qt/> <qt/>%LDMS_CLIENT_DIR%\ldiscan.cfg<qt/> DEVICEID=%Computer - Device ID% REMEXEC13=<qt/>%LDMS_CLIENT_DIR%\tokreplw.exe<qt/> <qt/>%LDMS_CLIENT_DIR%\winbom.ini<qt/> COMPUTERNAME=%Computer - Device Name% REMEXEC14=<qt/>%LDMS_CLIENT_DIR%\copyfile.exe<qt/> c:\ldvpe1.img <qt/>%LDMS_CLIENT_DIR%\ldiscan.cfg<qt/> \ldclient\ldiscan.cfg REMEXEC15=<qt/>%LDMS_CLIENT_DIR%\copyfile.exe<qt/> c:\ldvpe1.img <qt/>%LDMS_CLIENT_DIR%\winbom.ini<qt/> \winbom.ini REMEXEC16=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /dest="%LDMS_CLIENT_DIR%\diskinfo.exe" /p="http://%CUSTJOBHOSTIP%/landesk/files/diskinfo.exe" REMEXEC17=<qt/>%LDMS_CLIENT_DIR%\diskinfo.exe<qt/> update_winnt_sif <qt/>%LDMS_CLIENT_DIR%\winnt.sif.new<qt/> REMEXEC18=<qt/>%LDMS_CLIENT_DIR%\copyfile.exe<qt/> <qt/>%LDMS_CLIENT_DIR%\ldvpe0.img<qt/> <qt/>%LDMS_CLIENT_DIR%\winnt.sif.new<qt/> \winnt.sif REMEXEC19=<qt/>%LDMS_CLIENT_DIR%\lddefrag.exe<qt/> <qt/>%LDMS_CLIENT_DIR%\ldvpe0.img<qt/>, STATUS REMEXEC20=<qt/>%LDMS_CLIENT_DIR%\bootfile.exe<qt/> %LDMS_CLIENT_DIR%\ldvpe0.img /keep /bootunsafe, ASYNC BEGINWINPE=TRUE REMPING21=WINPE, TIMEOUT=1800 REMEXEC22=drvmap.exe Domain\admin 1053C9FC81E60EEC3DF260F1E5A I: <qt/>\\ImageServer\images<qt/>, STATUS FACILITY=3513 REMEXEC23=drvmap.exe Domain\admin 1053C9FC81E60EEC3DF260F1E5A H: <qt/>\\CoreServer\ldmain<qt/>, STATUS FACILITY=3513 REMEXEC24=diskpart /s X:\LDClient\rmvol.txt REMEXEC25=diskpart /s X:\LDClient\assvol.txt REMEXEC26=cmd /c del /f /q C:\ldvpe1.img REMEXEC27=RunBatch -1 H:\osd\imaging backall.bat 0 i:\%Computer - Device Name{6}%, STATUS FACILITY=3510, SYNC, TIMEOUT=3600 REMEXEC28=reboot, timeout=2

WinPE Capture Script Dissected Only the [MACHINES] section is dissected here. As explained previously, the other sections are for the LANDesk Console or simply settings.

The first part of the [MACHINES] section that includes REMEXEC0 through REMEXEC20 is not discussed here. This document describes using PXE boot and only lines after BEGINWINPE=TRUE are processed.

48

Page 49: OS Deployment of Windows XP Using WinPE - Best Known Method

BEGINWINPE=TRUE

This line is used to determine the point in the script where commands that are to run only in WinPE begin.

REMPING21=WINPE, TIMEOUT=1800

This line performs a CBA ping that queries the workstation for the WinPE version of the LANDesk Agent. If the LANDesk Agent is not detected within 1800 seconds, this line fails.

REMEXEC22=drvmap.exe Domain\admin 1053C9FC81E60EEC3DF260F1E5A I: <qt/>\\ImageServer\images<qt/>, STATUS FACILITY=3513

This line is used to map a drive to the share where the image is to be stored. Drvmap.exe is a simple executable that decrypts the hashed password before mapping a drive.

REMEXEC23=drvmap.exe Domain\admin 1053C9FC81E60EEC3DF260F1E5A H: <qt/>\\CoreServer\ldmain<qt/>, STATUS FACILITY=3513

This line is used to map a drive to the share where the image tool ImageW.exe resides. Drvmap.exe is a simple executable that decrypts the hashed password before mapping a drive.

REMEXEC24=diskpart /s X:\LDClient\rmvol.txt

This line uses Microsoft’s diskpart.exe to remove any volumes that may possibly already exist. Volumes may point to hard drives, USB drives, CD or DVD drives, or others. These are cleared so that they can be reassigned in the following line.

REMEXEC25=diskpart /s X:\LDClient\assvol.txt

This line uses Microsoft’s diskpart.exe tool to reassign volumes.

REMEXEC26=cmd /c del /f /q C:\ldvpe1.img

This line is not necessary during a PXE boot. It is used to delete the LDVPE1.img file that from the hard drive after a LANDesk vboot.

REMEXEC27=RunBatch -1 H:\osd\imaging backall.bat 0 i:\%Computer - Device Name{6}%, STATUS FACILITY=3510, SYNC, TIMEOUT=3600

This line calls RunBatch, a tool that runs batch files, which calls Backall.bat. Backall.bat calls ImageAlw.exe and ImageW.exe to capture an image of all the partitions on the first drive.

REMEXEC28=reboot, timeout=2

This line is reboots the device once the image has been captured.

Sample WinPE Deployment Script from 8.7 SP2 [VALUES] Task=8 ScriptName=WinPE Deploy Sysprepped XP

49

Page 50: OS Deployment of Windows XP Using WinPE - Best Known Method

ScriptDescription=This script deploys a Sysprepped Windows XP image MCast=0 FallBackNIC= UseFallBackNIC=FALSE ImageUserName=admin ImageDomain=Domain.com ImagePassword=1053C9FC81E60EEC3DF260F1E5A ImageToolType=5 ImageUNC=\\ImageServer\images\31FC4A00.img ToolUNC=\\CoreServer\ldmain\osd\imaging\imagew.exe ImageToolCmd=RunBatch -1 h:\osd\imaging imagew.exe /RN /O i:\31FC4A00.img, STATUS FACILITY=3510, SYNC ImageToolCmdsFile=\\CoreServer\LDMAIN\LANDESK\FILES\WinPE Deploy Sysprepped XP.txt IsSysPrepImage=1 IsVistaSysPrep=0 UseExistingSysPrep=0 ExistingSysPrepFile= SysPrepFile=\\CoreServer\LDMAIN\LANDESK\FILES\WinPE Deploy Sysprepped XP.inf RemoteSysPrepCopyPath=c:\sysprep\sysprep.inf SysPrepTargetedType=0 UseInventoryName=1 ComputerNameTemplate=Sales-nnn ClientInstallDomain=Domain.com ClientInstallUsername=admin ClientInstallPassword=1053C9FC81E60EEC3DF260F1E5A ClientInstallUNC=\\CoreServer\ldlogon ConfigProcessors=0 ImageHWType=0 ImageOSType=0 ImageProcessorType=0 RemoteProcessorPath=%windir%\inf\hal.inf ConfigAdvancedMCast=0 UseWOL=FALSE WOLSeconds=120 DiscoveryType=0 MaxTMCThreads=5 MinTMCSleep=1 MaxTMCSleep=200 SubrepTTL=14 TargetTTL=2 [OWNER] GUID=eeff8fb7-8ea1-4fe8-9385-9a950f687b69 OSDPLUG=TRUE DESCRIPTION=This script deploys a Sysprepped Windows XP image NAME=WinPE Deploy Sysprepped XP TYPE=WinPE [JOBPARAM] ABORT_ON_CMD_FAILURE=1 TASK_COMPLETION_ENABLED=FALSE

50

Page 51: OS Deployment of Windows XP Using WinPE - Best Known Method

AUTOCOMPUTERNAME=Sales-nnn [MACHINES] REMEXEC0=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/bootfile.exe" REMEXEC1=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/tlibr16.dll" REMEXEC2=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/tlibr32.dll" REMEXEC3=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/lddefrag.exe" REMEXEC4=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/cicfgmgr.vxd" REMEXEC5=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/cindis.vxd" REMEXEC6=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/copyfile.exe" REMEXEC7=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/winbom.ini" REMEXEC8=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/ldvpe0.img" REMEXEC9=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /dest="C:\ldvpe1.img" /p="http://%CUSTJOBHOSTIP%/landesk/vboot/ldvpe1.img" REMEXEC10=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /p="http://%CUSTJOBHOSTIP%/landesk/vboot/tokreplw.exe" REMEXEC11=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /dest="%LDMS_CLIENT_DIR%\ldiscan.cfg" /p="http://%CUSTJOBHOSTIP%/landesk/vboot/guid.pds" REMEXEC12=<qt/>%LDMS_CLIENT_DIR%\tokreplw.exe<qt/> <qt/>%LDMS_CLIENT_DIR%\ldiscan.cfg<qt/> DEVICEID=%Computer - Device ID% REMEXEC13=<qt/>%LDMS_CLIENT_DIR%\tokreplw.exe<qt/> <qt/>%LDMS_CLIENT_DIR%\winbom.ini<qt/> COMPUTERNAME=%Computer - Device Name% REMEXEC14=<qt/>%LDMS_CLIENT_DIR%\copyfile.exe<qt/> c:\ldvpe1.img <qt/>%LDMS_CLIENT_DIR%\ldiscan.cfg<qt/> \ldclient\ldiscan.cfg REMEXEC15=<qt/>%LDMS_CLIENT_DIR%\copyfile.exe<qt/> c:\ldvpe1.img <qt/>%LDMS_CLIENT_DIR%\winbom.ini<qt/> \winbom.ini REMEXEC16=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /f /o /dest="%LDMS_CLIENT_DIR%\diskinfo.exe" /p="http://%CUSTJOBHOSTIP%/landesk/files/diskinfo.exe" REMEXEC17=<qt/>%LDMS_CLIENT_DIR%\diskinfo.exe<qt/> update_winnt_sif <qt/>%LDMS_CLIENT_DIR%\winnt.sif.new<qt/> REMEXEC18=<qt/>%LDMS_CLIENT_DIR%\copyfile.exe<qt/> <qt/>%LDMS_CLIENT_DIR%\ldvpe0.img<qt/> <qt/>%LDMS_CLIENT_DIR%\winnt.sif.new<qt/> \winnt.sif REMEXEC19=<qt/>%LDMS_CLIENT_DIR%\lddefrag.exe<qt/> <qt/>%LDMS_CLIENT_DIR%\ldvpe0.img<qt/>, STATUS REMEXEC20=<qt/>%LDMS_CLIENT_DIR%\bootfile.exe<qt/> %LDMS_CLIENT_DIR%\ldvpe0.img /keep /bootunsafe, ASYNC BEGINWINPE=TRUE REMPING21=WINPE, TIMEOUT=1800

51

Page 52: OS Deployment of Windows XP Using WinPE - Best Known Method

REMEXEC22=drvmap.exe Domain\admin 1053C9FC81E60EEC3DF260F1E5A I: <qt/>\\ImageServer\images<qt/>, STATUS FACILITY=3513 REMEXEC23=drvmap.exe Domain\admin 1053C9FC81E60EEC3DF260F1E5A H: <qt/>\\CoreServer\ldmain<qt/>, STATUS FACILITY=3513 REMEXEC24=diskpart /s X:\LDClient\wipeDisk0.txt REMEXEC25=cmd /c format /Y /FS:NTFS /Q /V:C-DRIVE c: REMEXEC26=RunBatch -1 h:\osd\imaging imagew.exe /RN /O i:\31FC4A00.img, STATUS FACILITY=3510, SYNC REMEXEC27=sdclient /f /o /dest="X:\LDClient\diskinfo.exe" /p="http://%CUSTJOBHOSTIP%/landesk/files/diskinfo.exe", STATUS REMEXEC28=sdclient /f /o /dest="X:\LDClient\assvol.txt" /p="http://%CUSTJOBHOSTIP%/landesk/files/assvol.txt", STATUS REMEXEC29=tokreplw X:\LDClient\assvol.txt partition=1 REMEXEC30=diskpart /s X:\LDClient\assvol.txt REMEXEC31=sdclient /f /o /dest="C:\sysprep\sysprep.inf" /p="http://%CUSTJOBHOSTIP%/landesk/files/WinPE%20Deploy%20Sysprepped%20XP.inf", STATUS REMEXEC32=sdclient /f /o /dest="C:\ldsleep.exe" /p="http://%CUSTJOBHOSTIP%/landesk/files/ldsleep.exe", STATUS REMEXEC33=tokreplw C:\sysprep\sysprep.inf COMPUTERNAME=%Computer - Device Name% REMEXEC34=cmd /c copy /y X:\LDClient\guid.pds C:\LDISCAN.CFG REMEXEC35=tokreplw C:\LDISCAN.CFG DEVICEID=%Computer - Device ID% REMEXEC36=tokreplw C:\LDISCAN.CFG IMAGEPATH=\\ImageServer\images\31FC4A00.img REMEXEC37=sdclient.exe<qt/> /f /o /dest="x:\ldclient\fixvista.bat" /p="http://%CUSTJOBHOSTIP%/landesk/files/FixVista.bat" REMEXEC38=sdclient.exe<qt/> /f /o /dest="x:\ldclient\fixntfs.exe" /p="http://%CUSTJOBHOSTIP%/landesk/files/fixntfs.exe" REMEXEC39=sdclient.exe<qt/> /f /o /dest="x:\ldclient\bcdedit.exe" /p="http://%CUSTJOBHOSTIP%/landesk/files/bcdedit.exe" REMEXEC40=RunBatch -1 X:\LDCLient x:\ldclient\FixVista.bat REMEXEC41=diskinfo extend_last_partition REMEXEC42=reboot, timeout=2

WinPE Deploy Script Dissected As the lines from REMEXEC0 through REMXEC20 are identical to those of a capture script, these lines are not repeated here.

Only the [MACHINES] section is dissected here. As explained previously, the other sections are for the LANDesk Console or simply settings.

The first part of the [MACHINES] section that includes REMEXEC0 through REMEXEC20 is not discussed here. This document describes using PXE boot and only lines after BEGINWINPE=TRUE are processed.

BEGINWINPE=TRUE

This line is used to determine the point in the script where commands that are to run only in WinPE begin.

52

Page 53: OS Deployment of Windows XP Using WinPE - Best Known Method

REMPING21=WINPE, TIMEOUT=1800

This line performs a CBA ping that queries the workstation for the WinPE version of the LANDesk Agent. If the LANDesk Agent is not detected within 1800 seconds, this line fails.

REMEXEC22=drvmap.exe Domain\admin 1053C9FC81E60EEC3DF260F1E5A I: <qt/>\\ImageServer\images<qt/>, STATUS FACILITY=3513

This line is used to map a drive to the share where the image is to be stored. Drvmap.exe is a simple executable that decrypts the hashed password before mapping a drive.

REMEXEC23=drvmap.exe Domain\admin 1053C9FC81E60EEC3DF260F1E5A H: <qt/>\\CoreServer\ldmain<qt/>, STATUS FACILITY=3513

This line is used to map a drive to the share where the image tool ImageW.exe resides. Drvmap.exe is a simple executable that decrypts the hashed password before mapping a drive.

REMEXEC24=diskpart /s X:\LDClient\wipeDisk0.txt

This line is uses Microsoft’s diskpart.exe tool to wipe all partition from the drive.

REMEXEC25=cmd /c format /Y /FS:NTFS /Q /V:C-DRIVE c:

This line is uses Microsoft’s format.exe tool to format the drive using NTFS. This command in not necessary for ImageW.exe and is included for another imaging utility that may need it.

REMEXEC26=RunBatch -1 h:\osd\imaging imagew.exe /RN /O i:\31FC4A00.img, STATUS FACILITY=3510, SYNC

This line calls RunBatch, a tool that runs batch files, which calls ImageW.exe to deploy a single partition image to the first drive. The image is written to the hard drive here.

Note: If the image being deployed was a multi-partition image, RunBatch would have called Restall.bat, which uses ImageAlw.exe, instead of directly calling ImageW.exe.

REMEXEC27=sdclient /f /o /dest="X:\LDClient\diskinfo.exe" /p="http://%CUSTJOBHOSTIP%/landesk/files/diskinfo.exe", STATUS

This line calls sdclient.exe with these parameters: /f (file transfer), /o (overwrite), /dest (destination path), and /p (source path). The file is downloaded from the source to the destination.

This line is used to download diskinfo.exe. Diskinfo.exe is used to expand a partition to fill the entire drive.

53

Page 54: OS Deployment of Windows XP Using WinPE - Best Known Method

REMEXEC28=sdclient /f /o /dest="X:\LDClient\assvol.txt" /p="http://%CUSTJOBHOSTIP%/landesk/files/assvol.txt", STATUS

This line calls sdclient.exe with these parameters: /f (file transfer), /o (overwrite), /dest (destination path), and /p (source path). The file is downloaded from the source to the destination. This line is used to download assvol.txt. Assvol.txt is a script used with diskpart.exe to assign the correct volumes.

REMEXEC29=tokreplw X:\LDClient\assvol.txt partition=1

This line uses tokreplw.exe, a tool used to replace tokens in a text file, to modify the assvol.txt so that the correct partition is set to be the C drive.

In this example, the C drive is partition=1, however if the system had a vendor partition as the first partition, the C drive should be set to partition=2.

This setting is configured when created the OS Deployment script on the Image type and path screen.

REMEXEC30=diskpart /s X:\LDClient\assvol.txt

This line calls diskpart.exe with the assvol.txt script. This executes the script to assign the C drive to the correct partition on the correct volume.

REMEXEC31=sdclient /f /o /dest="C:\sysprep\sysprep.inf" /p="http://%CUSTJOBHOSTIP%/landesk/files/WinPE%20Deploy%20Sysprepped%20XP.inf", STATUS

This line calls sdclient.exe with these parameters: /f (file transfer), /o (overwrite), /dest (destination path), and /p (source path). The file is downloaded from the source to the destination. This line is used to download sysprep.inf file. On the source, the sysprep.inf is named after the script, but when downloaded, it is placed on the C drive in the Sysprep folder and named Sysprep.inf.

REMEXEC32=sdclient /f /o /dest="C:\ldsleep.exe" /p="http://%CUSTJOBHOSTIP%/landesk/files/ldsleep.exe", STATUS

This line calls sdclient.exe with these parameters: /f (file transfer), /o (overwrite), /dest (destination path), and /p (source path). The file is downloaded from the source to the destination. This line is used to download ldsleep.exe file. LDSleep.exe is used as the first command in the GUIRunOnce section of Sysprep to wait 30 seconds to allow other services to start on the workstation before starting to run other GUIRunOnce commands.

Without ldsleep.exe, the net use command in the GUIRunOnce section of Sysprep may fail, causing the LANDesk Agent to not install, which causes the workstation to remain logged in as a local administrator.

54

Page 55: OS Deployment of Windows XP Using WinPE - Best Known Method

REMEXEC33=tokreplw C:\sysprep\sysprep.inf COMPUTERNAME=%Computer - Device Name%

This line uses tokreplw.exe, a tool used to replace tokens in a text file, to dynamically modify sysprep.inf so that the correct computer name is used. The database token %Computer - Device Name% uses the current name if the workstation exists in the LANDesk inventory database or it uses the alternate naming scheme configured when creating the OS Deployment script.

REMEXEC34=cmd /c copy /y X:\LDClient\guid.pds C:\LDISCAN.CFG

This line copies a file to the C drive called LDISCAN.CFG. When the agent installs, it looks for this file, and if it is there, it uses the same Device ID that is listed in this file. This allows an existing workstation to have the same Device ID after it is re-imaged.

REMEXEC35=tokreplw C:\LDISCAN.CFG DEVICEID=%Computer - Device ID%

REMEXEC36=tokreplw C:\LDISCAN.CFG IMAGEPATH=\\ImageServer\images\31FC4A00.img

The above two lines uses tokreplw.exe, a tool used to replace tokens in a text file, to dynamically modify LDISCAN.CFG to contain the correct Device ID and the IMAGEPATH. These values will be visible in the LANDesk inventory database after the device installs the LANDesk Agent and send in a scan.

REMEXEC37=sdclient.exe<qt/> /f /o /dest="x:\ldclient\fixvista.bat" /p="http://%CUSTJOBHOSTIP%/landesk/files/FixVista.bat"

REMEXEC38=sdclient.exe<qt/> /f /o /dest="x:\ldclient\fixntfs.exe" /p="http://%CUSTJOBHOSTIP%/landesk/files/fixntfs.exe"

REMEXEC39=sdclient.exe<qt/> /f /o /dest="x:\ldclient\bcdedit.exe" /p="http://%CUSTJOBHOSTIP%/landesk/files/bcdedit.exe"

The above three lines call sdclient.exe with these parameters: /f (file transfer), /o (overwrite), /dest (destination path), and /p (source path). The file is downloaded from the source to the destination.

These lines are used to download tools needed to make images for Windows Vista work and are not necessary unless imaging Vista.

REMEXEC40=RunBatch -1 X:\LDCLient x:\ldclient\FixVista.bat

This line calls RunBatch to launch a FixVista.bat which in turn calls the tools needed to make images for Windows Vista work. This line is not necessary unless imaging Windows Vista.

REMEXEC41=diskinfo extend_last_partition

This line calls diskinfo.exe to extend the last partition to fill the entire drive.

55

Page 56: OS Deployment of Windows XP Using WinPE - Best Known Method

REMEXEC42=reboot, timeout=2

This line calls reboots the workstation as the imaging process is now complete and the device is ready to reboot and run through mini-setup, which is automated because of the presence of the sysprep.inf in c:\sysprep.

Reading Logs Results of an OS Deployment Script When an OS Deployment script runs, whether launched from the Management Suite Console or from the LANDesk Boot Menu after PXE booting, the Core Server writes the result to a log file. By default, this log file is in the following directory:

• C:\Program Files\LANDesk\ManagementSuite\Log

The file name looks as follows:

• cj-OSD-[Name of Script]-[MMDDYYYY]-[HHMMSS].log

As of Management Suite 8.7 SP2, this log should show the result of each command.

The best method for troubleshooting is to comment out the reboot line at the end of the script and access the command prompt when the script finishes.

Appendix D – Custom Modifications to an OS Deployment Script Script can be modified as text files by right-clicking the script in the Management Suite Console and clicking Advanced edit. For more information on custom modifications of scripts, download and review the Using Custom Scripts whitepaper. This document describes many powerful features. http://www.landesk.com/support/download/mgtsuite6.62/docs/using custom scripts 1.0.pdf

New Requirement for Making a Custom Modification to an OS Deployment Script In Management Suite 8.7 and later, when manually modifying an OS Deployment script, the following line must be created in the [OWNER] section of the script.

[OWNER] CREATEMANUALLY=TRUE Without this line, the script may be overwritten when the task is scheduled. The information for the script is stored in the database and the script may be recreated from this information when the task is scheduled. However, if this line exists, the script will not be overwritten.

56

Page 57: OS Deployment of Windows XP Using WinPE - Best Known Method

Adding Commands to the End of an OS Deployment Script Commands can be added manually to the end of an OS Deployment script. While lines can be added to any place inside the script for numerous reasons, this section will only describe how to add lines to the end of the script.

Comments can be added. A commented line is any line that begins with a semi-colon (;). It is recommended that when adding lines, comments be added to explain why the line was added.

;This is a comment.

The last line reboots the workstation. If adding commands afterwards, the following line must check for the LANDesk Agent. Remember, the LANDesk Agent is installed by the GUIRunOnce section of the Sysprep.inf. This means the device must reboot, run through Sysprep, run the GUIRunOnce commands, and reboot again before the LANDesk Agent can be detected. The timeout needs to be set long enough to allow all this to occur.

This is an example of how to have a Scheduled Task execute to deploy software via a policy on the workstation after it is fully booted up and ready. The example contains many comments. Lines that are not comments are in bold.

Note: The scheduled task must be targeted to a query and the workstation must be included in that query once it send inventory to the LANDesk database. The Task ID must be obtained. This Task ID is in the name of the Software Distribution task’s log file.

REMEXEC27=reboot ; This next line waits for the reboots and the LANDesk Agent REMPING28=WIN TIMEOUT=900 ; Once the Agent is detected, allow 5 more minutes just to make ; sure all services are started with a SLEEP line and that the ; inventory scan has been processes by the Core Server, more time ; can be added if needed. SLEEP29=300 ; Runing a LOCEXEC runs the command on the Core server. This ; runs a command on the core to update a query for the task so ; the query includes the newly imaged device. The scan must have ; processed by now. ; Warning: This causes processing on the Core Server for each ; device that runs this script. Do not run on too many devices at ; one time. LOCEXEC30="C:\Program Files\LANDesk\ManagementSuite\schedqry.exe" /allqueries ; Instead of the /allqueries switch, a /policy=<TaskID>) switch ; can be used. This only resolves the queries for one task which ; uses less overhead. ; Sleep again to make sure the query has time to evaluate and ; update the task. SLEEP31=60 ; Launch Policy-based delivery (amclient.exe). This line may not ; be needed if amclient.exe is configured to run with Local

57

Page 58: OS Deployment of Windows XP Using WinPE - Best Known Method

; Scheduler. REMEXEC32=<qt/>%LDMS_CLIENT_DIR%\amclient.exe<qt/> /apm /s /ro , ASYNC ; ASYNC runs that task without waiting for a status. Status can ; now be obtained by watching the Scheduled Task for software. If ; other policy tasks happened to evaluate their queries as well, ; as this device resolved as a target of the query, then other ; policies may be applied by this process. ; ; End of Custom Edits to the script

Appendix E - WinPE and ImageW Feature Matrix WinPE is based on the Linux 2.6 kernel and supports all the hardware supported by that kernel. ImageL.elf provides a fast and cost effective method for quickly capturing and deploying images in a Linux environment. WinPE can capture and deploy images of any operating system, not just Linux. Capturing Windows bases operating systems is part of the primary design.

While WinPE does not require extra licensing, as does WinPE and DOS PE, it does not support the full range of OS Deployment features. The following is a support matrix for OS Deployment using WinPE.

Imaging Features with WinPE and Imagel.elf

Managed PXE Boot A

PXE Menu A

Managed VBoot A

Capture Single Partition A

Deploy Single Partition A

Capture Multiple Partitions A

Deploy Multiple Partitions A

Multicast Single Partition A

Multicast Multiple Partitions A

Expand partition to fill drive A

Capture/Deploy partitions from/to IDE Drives A

Capture/Deploy partitions from/to SCSI Drives A*

Capture/Deploy partitions from/to SATA Drives A*

Sysprep Integration (2000, XP, 2003, and Vista) A

Command Prompt Access M

58

Page 59: OS Deployment of Windows XP Using WinPE - Best Known Method

Capture/Deploy to/from UNC Share A

Capture/Deploy to/from CD U

Command line parameters for ImageW.exe A

Command line parameters for ImageX.exe A

Command line parameters for Ghost32.exe A

Command line parameters for other Imaging tools M * Drivers may need to be added to support drive controllers.

A (Automated) This means that this process is supported and the Management Suite Console will automatically configure the scripts to do this process.

M (Manual) or U (Untested) Manual means that this process is possible but manual modifications will need to be made to the scripts to make this process work. Untested means that this process is untested and though it may be possible, it is not supported.

NS (Not Supported) This means that this process is not supported.

Important: For best results when capturing and deploying and image, build a source image with only one partition. If the drive includes an OEM partition, remove it. Also, the partition on the source image does not have to fill the entire drive; in fact, it is recommended that the source partition be smaller in size than the smallest hard drive to which the image will be deployed.

Appendix F - ImageW.exe Command Line Switches The command line switches for ImageW.exe can be seen by running it manually in a command prompt with a “/?” switch.

59

Page 60: OS Deployment of Windows XP Using WinPE - Best Known Method

60