How to build and Optimize a Windows XP Image for XenDesktop

1. Use a volume license Windows XP ISO that already has SP2/SP3 on it.

2. Build a new VM that has at least 512 MB and a 6 – 8 GB drive. You may need more or less depending the applications that will be installed.

3. Attach the Windows XP ISO to the CD/DVD drive and set it to connect at power on.

4. Attach the Buslogic driver floppy image “/vmimages/floppies/vmscsi-” to the Floppy drive.

5. On the VM Edit Settings window go to the Options tab and in the General section uncheck the Enable logging check box.

6. Go to the Boot Options section and check the box to force going into the BIOS on next boot.

7. Power on the VM and when the BIOS appears go to Advanced, I/O Device Configuration.

8. Disable the Serial and Parallel ports.

9. Go to the Boot menu and set the CD-ROM first in the boot order.

10. Save and exit.

11. When the install starts press the F6 key to load a mass storage driver.

12. Press S to load the Buslogic driver.

13. Press Enter to choose the driver.

14. Continue installing Windows XP.

15. During the install you will get a couple of driver install prompts, choose Yes to both.

16. On first boot after the initial install the startup wizard will run. On the 2nd screen choose “Not right now”

17. Choose, “No” and then choose Skip at the bottom.

18. Choose “No, not at this time.”

19. Type “temp” for your name.

20. Go to VM, Edit settings, disconnect the CD and floppy, set them both to Client device.

21. Install VMware Tools, choose to do a Custom install.

22. Do not install the Shared Folders driver.

23. After the install completes reboot.

24. Right-click on the desktop and go to display properties, set the theme to Windows Classic.

25. Set the Screen Saver to none. Click Apply.

26. Go to My Computer properties, Advanced tab, Performance settings. Choose “Adjust for best performance”, click Apply.

27. Go to Startup and Recovery settings. Set the debugging information to none, uncheck the “Send an administrative alert”. Click OK.

28. Go to Error Reporting and choose Disable error reporting and uncheck the notify box.

29. Go to the Remote tab and uncheck both boxes. Click Apply.

30. Go to the Automatic Updates tab and turn off automatic updates. Click Apply.

31. Go to the System Restore tab and turn off System Restore. Click Apply.

32. Click OK, to exit the System Properties window.

33. Right-click on the taskbar and go to properties. Go to the Start Menu tab and choose Classic Start Menu, click apply, click Customize.

34. Scroll to the bottom of the Advanced Start menu options and check the box for “Show Small Icons in Start menu” and uncheck the “Use Personalized Menus” box. Click OK, and click OK.

35. Right-click on the desktop and go to properties. Go to the Desktop tab and click Customize Desktop, uncheck the Run Desktop Cleanup Wizard every 60 days, click OK, click Apply.

36. Go to the Appearance tab and click Advanced, uncheck all of the boxes and click OK. Click OK.

37. Right-click on the taskbar, go to Toolbars and choose Quick Launch.

38. Open the Control Panel, go to the View menu, choose Status bar and List.

39. Right-click on the Go button and uncheck the Go Button.

40. Right-click on the toolbar and choose Customize, set the Text options to No text labels and set Icon options to Small icons.

41. Go to Tools, Folder Options, View tab and check/uncheck the boxes below.

42. Click Apply, click Apply to All Folders and choose Yes.

43. Go to Add/Remove Programs, Add/Remove Windows Components. Go to Accessories and Utilities, remove Games and remove the optional components shown below.

44. Remove MSN Explorer, Networking Services, Outlook Express and Windows Messenger.

45. Choose No to reboot now.

46. Open User Accounts, click Change the way users log on or off, Uncheck both boxes and click apply.

47. Right-click on the taskbar, go to properties and check the box to Display Log Off.

48. Right-click on the Start button and choose Open All Users. Delete the three shortcuts for Set Program Access and Defaults, Windows Catalog and Window Update.

49. Go to Control Panel, Administrative Tools, Right-click Computer Management and choose Author.

50. Maximize the window, Expand Services and Applications, select Services, expand the Name column, go to File Save, choose Yes to the prompt. Close Computer Management.

51. Open Computer Management again, go to Services, Stop and disable these services.

a. Computer Browser

b. Error Reporting Service

c. Help and Support

d. Security Center

e. Task Scheduler

f. SSDP Discovery Service

g. Themes

h. Windows Firewall/Internet Connection Sharing (ICS)

i. Wireless Zero Configuration

52. Go to Start, Run and type regedit, go to this key, HKEY_USERS\.DEFAULT\Control Panel\Desktop and delete the SCRNSAVE.EXE name.

53. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters, right-click on Parameters and choose New, DWORD value, type DisableTaskOffload and set the Data to 1.

54. Go to HKEY_CURRENT_USER\Control Panel\Desktop and change the MenuShowDelay to 0.

55. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control, right-click on Control and choose New DWORD value, type ServicesPipeTimeout and set the Data to 120000 decimal.

56. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server and add a new DWORD value called AllowRemoteRPC and set it to 1. This will allow shadowing of the XenDesktop session for remote support. Once this key is set you can shadow a session by running this command “shadow 0 /server:VMNAME.

57. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run and delete the VMware Tools name.

58. Go to Start, Run and type cmd to open the CMD prompt. Type “FSUTIL behavior set disablelastaccess 1” and press Enter.

59. Type “sfc /purgecache”, press enter, type “sfc /cachesize=0” and press enter. Type exit.

60. Reboot and login as temp.

61. Click on the Windows XP Tour in the system tray, click Cancel.

62. Go to Start, Settings, Printers and Faxes. Go to File, Server Properties, Advanced tab and uncheck all of the boxes.

63. Open Internet Explorer, go to Tools, Windows Update. Install the Microsoft Update by clicking the Go button.

64. Install all High Priority updates and under Software, Optional install Root Certificates Update.

65. After the updates complete, reboot.

66. Login as temp.

67. Run Microsoft Update from the Start menu to get any remaining updates.

68. Right-click on the Language bar and choose Settings.

69. Go to the Advanced tab and turn off advanced text services.

70. Go to the cmd prompt and run this command to unregister the language bar.
“Regsvr32.exe /u msutb.dll”

71. Right-click on Internet Explorer on the desktop and go to properties.

72. Set the Home page to blank and click Delete and then click Delete all, check the box to Also delete files.

73. Go to the Advanced tab and check/uncheck the boxes below

74. Open Internet Explorer and go through the first time startup wizard, choose to keep

75. Change the default search provider from Live Search to Google.

76. Go to My Computer properties, Advanced tab, Performance settings, Advanced tab and set the page file on the C drive to No paging file, click Set. Do not reboot yet.

77. Download and install the User Profile Hive Cleanup tool. The fastest way to find this tool is to search Google for uphclean.

78. Reboot and login as Administrator.

79. Open My Computer, go to Tools, Folder options and set the view option to show hidden files and folders.

80. Right-click on My Computer, go to Properties, Advanced, User Profiles Settings, select temp, copy to, browse to c:\documents and settings\default user, change Permitted to use to Authenticated users. Click OK, Click Yes to the confirm copy question.

81. Log out and login as temp.

82. Delete the local administrators profile from the system properties tool.

83. Log out and login as Administrator.

84. Delete the temp user account and user profile.

85. Go to C:\WINDOWS and delete all the folders that start and end with a $

86. Open C:\Documents and Settings\Default User and delete the temp’s Documents folder.

87. Defragment the C drive.

88. Power down the VM and convert it to a template.

89. Use this template to deploy an XP VM for use with any VDI (XenDesktop, VMware) or use it for any purpose that an XM VM is needed.

25 thoughts on “How to build and Optimize a Windows XP Image for XenDesktop

  1. Very very comprehensive. My sincere thanks and appreciate to you Jeremy. Thank you indeed.

    Combined with the following:

    We are sure to have solid, high performing VM templates.

    One note however is that I prefer the LSI logic driver in XP Templates….how to do this can be found here….
    *Not so easy, but doable.

  2. Pingback: Interessante Links - Tom Schimana

  3. hi

    excelent post. thank you so much .. u rock🙂 , its very useful. i have been searching for this kind of document for a long time and i found now thanks🙂

  4. Pingback: XenDesktop Design Resources « Matt Hensley’s Blog

  5. Hi,

    Thanks for your post, it’s been a great help.

    You mentioned turning off the page file on the C: drive. Is this just for defragmenting purposes and do you re-create the page file later on, or do you advise not to use a page file at all?

  6. This is so that I can fully defragment the C drive. The page file gets recreated when sysprep runs, although for XenDesktop I recommend placing the page file in a local disk (VMDK) because with XenDesktop the C drive will be streamed from Provisioning Server.

  7. hi – thanks for the great post, it has been a great help here as well. can you recommend further reading on best practice for where to place the pagefile exactly with regards to streaming to the local hd or having the vdisk settings set to save to server? thanks

  8. Best practice for Provisioning Server Write Cache is to use a local disk. For example a local VMDK that is large enough for the Page File, Write Cache and possible Event Logs if you want to redirect those. I usually use a 6 GB local VMDK for this in XenDesktop. Here is a great CTX article on Write Cache –

  9. great article, thanks. this helps clarify a lot. i am getting occassionally “no pagefile” when I copy my master image to my xendesktops. using ‘cache to hd’ with my master image originally having pagefile on c:. my xd images typically map an S, T, U, V, so i’m trying to figure out where the pagefile gets set and why this has been a problem more than once. i just set my master image with a pagefile to D: and pushed the image out, and it ended up on C: on my xd images. confused. appreciate your comments/suggestions thnx

  10. i don’t understand how or why to do that. i’m not understanding some part of this. is this a drive defined when i create the template, and if so, how do you format it at that time? thanks

  11. or do you mean create a C & D both on my original VM, put the pagefile on D:, and when I do a xenconvert, xenconvert both over? thnx for the clarification, i’m moments away from a lightbulb.

  12. You create and format it on the VM before you make it a template. You also change the Windows page file configuration to point to the new local drive before you make it a template.

  13. one last question – in order to then see the drive that the vm saw, do i convert that VM to a template, or create new template? i assume i need to create a new template from that vm in order for it to somehow see the drive(s) – or can I specify this in a blank/new template. thnx again this has been a great help.

  14. you convert the vm to a template and then specify that template when you use the xendesktop setup wizard to create a pool of desktops. if you have existing desktops delete those from AD, PVS, DDC and the VMs.

  15. Knowing we’re gonna use this OS image with Xendesktop DDC/PVS, should we join it on the domain already or not?

    And what about syspreping? Didn’t see anything about it in citrix docs but still asking.


  16. the master image will have to be in the domain. PVS handles the AD/SID to domain synch so there is no need to sysprep a PVS image.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s