Archive for the ‘Tutorial’ Category

Copy Taskbar Icons Windows 7 Sysprep v2

Monday, June 21st, 2010

Ok, you can thank a colleague of mine (Dinyero Johnson) for this new single vbs script that now copies the taskbar icons and deletes itself.

The vbs script is a little nicer than version one (CMD) because it runs without any windows and in my opinion vbs scripts just run smoother :) . Also, it is a single file and the tutorial has less steps.

So for all of you who grabbed version one, lol, grab version 2!!! And if you are using WIM images, you can simply mount your image, replace the script, and unmount/commit.

Repeat instructions are below:

When running sysprep in Windows 7 with the unattend.xml file, you will probably notice that the taskbar icons are something that don’t copy over. Well that is because the icons are not part of the users profile. So the copyprofile=true command does work for almost everything, but it doesn’t copy over your taskbar icons. So here is a script that will do it for you.

Step #1

Download the vbs script (11kb). Click Here to Download or Right Click and Save Target As….
You might have to remove the .txt extension when you are downloading the script. You are going to drop this script into the correct place during audit mode.

Step #2

Copy the vbs script into the startup folder in the start menu.

Step #3

The vbs script unpins WMP, IE, and Windows Explorer and then repins the icons in the order you want. My file has this order:

Windows Explorer, IE, Firefox, Word, Excel, Outlook, WMP

Step #4

Now run sysprep as you normally would and the script is copied into the default profile. That means for every new user, the script pins the icons in the order you want, the script then deletes itself and never runs again. For the correct procedure on sysprepping your machine, read my Windows 7 Sysprep Tutorial.

Share and Enjoy:
  • Twitter
  • Facebook
  • Digg
  • del.icio.us
  • Technorati
  • StumbleUpon
  • Google Bookmarks

Copy Taskbar Icons Windows 7 Sysprep

Wednesday, June 16th, 2010

THIS IS OLD, VERSION 2 IS NOW AVAILABLE – CLICK HERE

Sorry for not posting this earlier but I have had a rough last couple months. Just now getting back into the swing of things.

When running sysprep in Windows 7 with the unattend.xml file, you will probably notice that the taskbar icons are something that don’t copy over. Well that is because the icons are not part of the users profile. So the copyprofile=true command does work for almost everything, but it doesn’t copy over your taskbar icons.

Thankfully the “Deployment Guys” already have a VBS script that will pin and unpin icons. I have edited this script and done most of the hard work for you. Basically we are going to dump a few scripts into the “startup folder” (and yes I said startup folder, it is messy but it works and finishes clean) which will run only the first time every new user logs in. It will pin the icons you want, in any order you want, both to the taskbar and the startmenu and then the script is deleted from the startup folder and never runs again for that user. It does work perfectly and I currently am using this in a corporate environment with around 400-500 computers.

Step #1

Download the scripts that I have packaged together. Click here to download. Again, most of these scripts were written by The Deployment Guys, I have just tweaked them and added a few. It is a 35mb zip file.

The zip file contains the following files:

- taskbar.bat
- taskbar_operations.cmd
- pin.wsf
- unpin.wsf
- pinitem.vbs
- listverbs.vbs
- zti-specialfolderlib.vbs
- ztiutility.vbs

You are going to drop these scripts into the correct places during audit mode.

Step #2

Copy the taskbar.bat file into the startup folder in the start menu.

Below is an explanation of what that taskbar.bat file is doing:

cd C:\Windows\Scripts\
This changes the directory to the scripts folders.

call taskbar_operations.cmd
Calls the cmd file which unpins and pins the taskbar icons.

cd C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup”
This changes the directory to the startup folder.

DEL taskbar.bat
This deletes the taskbar.bat after it is done, so it won’t run again for that user.

Step #3

The taskbar_operations.cmd file is the file that has all the custom icon paths in it that are pinned or unpinned.
My file has the following in this order:

Windows Explorer, IE, Firefox, Word, Excel, Outlook, WMP

If you want to change these, simply look in the cmd file and you will figure out what you need to change, it is pretty simple. Also, the default order when running sysprep is WMP, IE, and Windows Explorer, so the script is actually unpinning WMP, unpinning IE, (windows explorer is now bumped over to the left side) and then it pins the rest of the icons in order.

Step #4

Create a “scripts” folder in the C:\Windows directory and drop all of the files into it, except for the taskbar.bat file which you should already have in your startup folder.

Step #5

Now run sysprep as you normally would and the scripts are copied into the default profile. That means for every new user, the scripts pin the icons in the order you want, the script then deletes itself and never runs again. For the correct procedure on sysprepping your machine, read my Windows 7 Sysprep Tutorial.

I am definitely not a programmer, but this works, and I don’t see Microsoft giving us a better solution :) .

Share and Enjoy:
  • Twitter
  • Facebook
  • Digg
  • del.icio.us
  • Technorati
  • StumbleUpon
  • Google Bookmarks

Sysprep a Windows 7 Machine – Start to Finish V2

Monday, January 18th, 2010

SPREAD THE WORD, TOGETHER WE HAVE CONQUERED SYSPREP :)

This is version 2 of a step by step guide on Sysprepping a Windows 7 machine from start to finish. I cannot take full credit on this because my first article had so many helpful comments and discussions that this is simply a combination of all the good advice written into a working guide. (I would especially like to thank George for his input on Cscript for auto activation and Nathan for input on Sysprep Audit Mode). This will guide you through the following:

- Audit Mode
- Building the unattend.xml file in WSIM
- copyprofile=true command to copy the default profile (no manual copy)
- Prompt for a computer name
- Enable Administrator account
- Administrator account logs in first time automatically
- Activate windows automatically with Cscript;
- Successfully copy over taskbar icons;
- Delete unattend.xml file automatically upon completion of re-image.

Here is a list of what you will need:

- Latest version of WAIK : KB3AIK_EN.iso Version 1.0
- Windows Vista or Windows 7 Machine to build the XML file on
- ISO or DVD of Windows 7 Installation (x32 or x64)
- WinPE Boot Environment : BrianLeeJackson WinPE 3.0 BootLoader

First we are going to walk through building the unattend.xml file (answer file) and then we will walk through the actual Windows 7 imaging process.

PART 1 – XML FILE CREATION

Step #1

If you have a Windows 7 installation DVD, insert it now. Or if you have an ISO of 7, go ahead and extract it to a folder on your desktop. (I recommend 7-zip).

Step #2

Launch Windows System Image Manager. Your start menu should look like the image below:

Windows 7 WAIK Version 1

Windows 7 WAIK Version 1

Step #3

Under the “Windows Image” header, right click and select new image.

Windows System Image Manager

Windows System Image Manager

Step #4

You will now want to browse to the .CLG file in your Windows 7 installation (I am using Windows 7 Enterprise x64 in my example). It is located in the sources folder. See Image below. You can select either the .clg file or the install.wim. Both will have the same result.

Selecting CLG File - WSIM

Selecting CLG File - WSIM

Step #5

Now we need to create a new answer file. Go to the file menu and select “Create New Answer File.” Right after creating one, go ahead and simply go to file menu and select “Save Answer File.” This will give your XML file a name and save location. I chose to name mine unattend.xml. Now you see we have two category folders, Components and Packages. Under the Components folder you see that we have 7 options:

-1 windowsPE
-2 offlineServicing
-3 generalize
-4 specialize
-5 auditSystem
-6 auditUser
-7 oobeSystem

Step #6

These are very important as these are the steps in which the unattend.xml file is sequenced.
The next part is a little confusing. You are going to add components, from under the “Windows Image” section on the bottom left hand side to the passes on your Answer File. To add a component, you can right click on them and select “add to # pass”. There are many different options you can add, but they have to be done in a certain order and pass otherwise your sysprep might fail. I am simply going to use the one I created as the example.

Answer File - Unattend.xml

Answer File - Unattend.xml

Here is more information about adding options under the passes:

1 windowsPE

Nothing required in my example.

2 offlineServicing

Nothing required in my example.

3 generalize

amd64_Microsoft-Windows-Security-SPP_6.1.7600.16385_neutral

Set 1 for SkipRearm to allow up to 8 rearms

4 specialize

amd64_Microsoft-Windows-Deployment_6.1.7600.16385_neutral

      1. Order: 1
        path: net user administrator /active:yes
        WillReboot: Never
    1. RunSynchronousCommand[Order="1"]

  1. RunSynchronous

amd64_Microsoft-Windows-Security-SPP-UX_6.1.7600.16385_neutral

SkipAutoActivation: true

amd64_Microsoft-Windows-Shell-Setup_6.1.7600.16385_neutral

Computer Name: Leave blank (we will deal with this at the end)
CopyProfile: true
Registered Organization: Microsoft (you must leave this in this section)
Registered Owner: AutoBVT (you must leave this in this section)
ShowWindowsLive: false
TimeZone: Pacific Standard Time

You can delete other sub-header components if you don’t need them.

5 auditSystem

Nothing required in my example.

6 auditUser

Nothing required in my example.

7 oobeSystem

amd64_Microsoft-Windows-International-Core_6.1.7600.16385_neutral

InputLocale: en-us
SystemLocale: en-us
UILanguage: en-us
UserLocale: en-us

amd64_Microsoft-Windows-Shell-Setup_6.1.7600.16385_neutral

RegisteredOrganization: Your Company Name
RegisteredOwner: Your Name

  • AutoLogon
      1. Password: Administrator Password
    1. Enabled: true
      LogonCount: 5
      Username: administrator

  • FirstLogonCommands
      1. CommandLine: cscript //b c:\windows\system32\slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX (windows 7 license key)
        Order 1
        RequiresUserInput: false
        CommandLine: cscript //b c:\windows\system32\slmgr.vbs /ato
        Order 2
        RequiresUserInput: false
    1. SynchronousCommand[Order="1"]

      SynchronousCommand[Order="2"]

  • OOBE
    1. HideEULAPage: true
      NetworkLocation: Home
      ProtectYourPC: 1
  • UserAccounts
          1. Password: Administrator Password
        1. Action: AddListItem
          Description: Local Administrator
          DisplayName: Administrator
          Group: Administrators
          Name: Administrator

      1. LocalAccount[Name="Administrator"]

    1. AdministratorPassword: Administrator Password
      LocalAccounts

    If you have questions, look at my image above to see full layout of components, it should help.

    Step #7

    K, now go ahead and save your answer file as unattend.xml.

    Step #8

    If you want the sysprep to prompt for a computer name you need to remove a line from your XML file. Open up your XML file you saved with notepad and remove the following line:

    Unattend.xml Computer Name

    Unattend.xml Computer Name

    PART 2 – IMAGING PROCESS / RUNNING SYSPREP

    Step #9

    Install Windows 7 (Enterprise) from CD or USB flash drive, when you arrive at the welcome screen and it asks you to create a username, hit ctrl+shift+f3.
    This will reboot your machine and put your windows build in ‘audit’ mode.

    Step #10

    On reboot, you’ll automatically be logged in under the built-in Administrator account. A sysprep GUI box will appear, but you can close it and NOW begin to customize your profile.

    Step #11

    Install any software/drivers, make any profile customizations, etc.
    If you need to reboot, the computer will boot you back into the Administrator account. You will be stuck in this audit mode until you run sysprep with the /oobe parameter. After doing so, sysprep will delete/clean up the Administrator account, but if you have copyprofile=true in your unattended answer file, it will copy the customized Admin account to the default profile before deleting it.

    Step #12

    On the PC you are going to be running sysprep on, you need to create a folder called scripts in this directory: %WINDIR%\Setup\. Now you are going to create a CMD file within the %WINDIR%\Setup\Scripts directory. Right click and make a new text file called SetupComplete.txt. Remove the .txt extension and replace that with .cmd. You now have a SetupComplete.cmd file which windows will read the first time it boots up from the sysprep. We need to place a script inside the CMD file. Edit the cmd file with notepad and insert this line: del /Q /F c:\windows\system32\sysprep\unattend.xml. This script will delete your unattend.xml file after it has been used. The unattend.xml file is also copied to the C:\Windows\Panther directory, so you will want to add a second line to the CMD file, del /Q /F c:\windows\panther\unattend.xml. If you have passwords or cd keys stored in that xml file you don’t have to worry about it being left on the computer.

    UPDATE AS OF JUNE 16TH: Read my Taskbar Icons Tutorial before continuing.

    Step #13

    Once you have everything configured correctly, Copy or move your unattend.xml file to : C:\windows\system32\sysprep. Now to run sysprep, navigate to that sysprep folder, hold SHIFT and right click and select “Open New Command Windows Here”. Next, input the following commands:

    sysprep /generalize /oobe /shutdown /unattend:unattend.xml

    Step #14

    Turn the computer back on and boot to WinPE 3.0 environment (USB stick or CD/DVD). You can use my BrianLeeJackson WinPE3.0 BootLoader to boot up from USB or CD and capture your image. Capture image and save image to network location.
    A Dell 960 or GX755 is a good standard for capturing when you want a generic image for use with multiple systems. Might require injecting additional drivers for 3rd party brands, HP, etc. Most should work though right out of the box.

    Step #15

    On reboot, Windows will run out of the box, as the /oobe is intended. As long as you put your cd key into the unattend.xml file, windows will be activated automatically in the background, you will be automatically logged into the administrator account, and the unattend.xml file is deleted. You are now ready to use the computer or join it to the domain. Enjoy!

    Share and Enjoy:
    • Twitter
    • Facebook
    • Digg
    • del.icio.us
    • Technorati
    • StumbleUpon
    • Google Bookmarks

    How to install Windows 7 VGA driver on Dell GX270

    Sunday, December 6th, 2009

    This is a short guide on solving the problem when trying to install the VGA driver on a Dell GX270 when Windows 7 is installed.

    Step #1

    Install Windows 7 on the Dell GX270 computer. (Refer to my other articles for using ImageX and WinPE 3.0 boot environment for capturing and applying images).

    Step #2

    Once you have Windows 7 installed, at least for me, Windows Updates didn’t pick up the VGA driver automatically; leaving you with a very large resolution which is unusable.

    Step #3

    Download the Intel 82845G/GL/GE/PE/GV Graphics Controller driver (R126990.EXE). (Download Here) The drivers on Dell’s website do not work for Windows Vista or Windows 7.

    GX270 - R126990 driver

    GX270 - R126990 driver

    Step #4

    Once you have the R126990.EXE downloaded, you will need to extract the contents of the EXE to a folder. I suggest using 7-zip or Winrar. Download 7-Zip

    GX270 - Extracting the driver.

    GX270 - Extracting the driver.

    Step #5

    Now that you have the driver extracted you are going to have to install the driver manually in compatibility mode. Go into the folder you just extracted and right click on the setup.exe and go to properties and then the compatibility mode tab. You will want to enable compatibility mode for Windows Service Pack 3 and also select “Run as Administrator.”

    Run in Compatibility Mode

    Run in Compatibility Mode

    Step #6

    Click Apply, then click OK. Now run the setup.exe as you normally would and it shouldn’t complain about OS not being compatible.

    Share and Enjoy:
    • Twitter
    • Facebook
    • Digg
    • del.icio.us
    • Technorati
    • StumbleUpon
    • Google Bookmarks

    Zune HD 16GB 4.3 Firmware Update Trick

    Sunday, November 8th, 2009

    If you are like me you probably haven’t been very happy with the Zune HD browser. The 4.3 update fixes a lot of the problems with the browser and it is a lot more responsive. After installing the update you will now have an option in settings that you can have the browser render as “mobile” or as “desktop”. (If only we could get rid of the BING search) All the firmware update changes can be found on Gizmodo. I had trouble updating my firmware, it didn’t say I needed an update, said that 4.1 was the newest version. Here is what I did to fix the problem. (I am running Windows 7, but same options apply under XP or Vista)

    Step #1

    Unplug your Zune from USB and close your Zune software.

    Step #2

    Go to your control panel.

    Zune Control Panel

    Zune Control Panel

    Step #3

    Click on Clock, Language, and Region

    Zune Region Settings

    Zune Region Settings

    Step #4

    Click on “change location”.

    Zune Change Location

    Zune Change Location

    Step #5

    Change your location to “United Kingdom”.

    Zune UK

    Zune UK

    Step #6

    Now plug your Zune back in and launch the Zune software. Go to settings at top right and then to “Player Update” on left hand side.

    Zune Player Update

    Zune Player Update

    Step #7

    It should now ask you to upgrade player to 4.3. Select “Upgrade”. This will take a minute or two.

    Step #8

    You should now see a confirmation screen saying your player is fully up to date.

    Zune Player 4.3

    Zune Player 4.3

    Step #9

    You can now go back to control panel and change your region back to US.

    Share and Enjoy:
    • Twitter
    • Facebook
    • Digg
    • del.icio.us
    • Technorati
    • StumbleUpon
    • Google Bookmarks

    Run only scripts that you trust. Disable Powershell Message

    Monday, October 26th, 2009

    If you are like me you have probably run into the following error when trying to run powershell scripts. This becomes very annoying and tedious if you are running different scripts on a regular basis.

    “Security Warning – Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your computer. Do you want to run –.ps1? [D] Do not run [R] Run once [S] Suspend [?] Help (default is “D”):

    Step #1

    The first thing you need to do is launch Windows Powershell.

    Step #2

    Then enter the following commands:

    get-executionpolicy

    set-executionpolicy bypass

    Powershell Trust Scripts

    Powershell Trust Scripts

    Now launch your script and enjoy not seeing that annoying message come up.

    Share and Enjoy:
    • Twitter
    • Facebook
    • Digg
    • del.icio.us
    • Technorati
    • StumbleUpon
    • Google Bookmarks

    Completely removing Windows Vista/Windows 7 Printer Driver

    Sunday, October 25th, 2009

    If you right click on a printer and delete it, this doesn’t remove the printer driver from the machine. Sometimes when working with print servers and testing multiple drivers there will be times when you need to completely remove a driver package from the machine so you can install a new or different one.

    Windows Vista and Windows 7 has a tool called the Microsoft Management Console (MMC) built into windows which you will use to remove the drivers.

    Step #1

    Reboot the machine and login as “Administrator”.

    Step #2

    Go to the start menu and start typing MMC, you will see the Microsoft Management Console shortcut appear in the start menu; click on it.

    MMC - Remove Print Driver

    MMC - Remove Print Driver


    MMC

    MMC

    Step #3

    Go up to the file menu and select Add/Remove Snap-in…

    MMC - Add/Remove Snap-in...

    MMC - Add/Remove Snap-in...

    Step #4

    Then scroll down in the list and select the “Print Management” snap-in and then hit “Add”.

    MMC - Print Management

    MMC - Print Management

    Step #5

    At this screen you are going to want to select “Add the Local Server”, hit Finish, and then hit ok.

    MMC - Add the Local Server

    MMC - Add the Local Server

    Step #6

    Then you can scroll down to your computer name, select the drivers tree and then right click on the driver you want to remove and select “Remove Driver Package”.

    MMC - Remove Driver Package

    MMC - Remove Driver Package

    Step #7

    Make sure you reboot your machine before trying to add new or different print drivers.

    Share and Enjoy:
    • Twitter
    • Facebook
    • Digg
    • del.icio.us
    • Technorati
    • StumbleUpon
    • Google Bookmarks

    Completely removing Windows XP Printer Driver

    Sunday, October 25th, 2009

    If you right click on a printer and delete it, this doesn’t remove the printer driver from the machine. Sometimes when working with print servers and testing multiple drivers there will be times when you need to completely remove a driver package from the machine so you can install a new or different one.

    Step #1

    Reboot the machine and login as “Administrator”.

    Step #2

    Go to the control panel, go up to the file menu and select “Server Properties”.

    XP Server Properties

    XP Server Properties

    Step #3

    Select the “Drivers” tab and then you will now have a list of printer drivers currently installed on the machine. You can select “Remove” to completely uninstall and delete the driver package.

    XP Delete Printer Driver

    XP Delete Printer Driver

    Step #4

    Reboot the machine and the driver is gone. You can now test new or different drivers if needed.

    Share and Enjoy:
    • Twitter
    • Facebook
    • Digg
    • del.icio.us
    • Technorati
    • StumbleUpon
    • Google Bookmarks

    Ping returns IPv6 Address, ping IPv4?

    Tuesday, October 6th, 2009

    If you are on the same network, or Vlan, or subnet as someone else you will probably notice that if you ping their hostname it will return with a IPv6 address.

    If you want to still see what their IPv4 address is then simply use the command below:

    ping hostname -4

    Simply add a “-4″ after your normal ping command.

    Share and Enjoy:
    • Twitter
    • Facebook
    • Digg
    • del.icio.us
    • Technorati
    • StumbleUpon
    • Google Bookmarks

    Sysprep a Windows 7 Machine – Start to Finish

    Tuesday, September 8th, 2009

    THIS IS OLD, PLEASE SEE NEW VERSION 2, CLICK HERE

    This is a step by step guide on Sysprepping (and yes, I have made sysprepping a verb now) a Windows 7 machine from start to finish. This will guide you through building the unattended XML file, having the administrator profile copy over to default profile, and fixes for what is right now a not 100% working system from Microsoft. This is something I would have easily paid for when first starting this process. I don’t know why Microsoft can’t hand us a 100% working process. There will always be fixes, even with the RTM release.

    Here is a list of what you will need:

    - Latest version of WAIK : KB3AIK_EN.iso Version 1.0
    - Windows Vista or Windows 7 Machine to build the XML file on
    - ISO or DVD of Windows 7 Installation (x32 or x64)
    - WinPE Boot Environment : BrianLeeJackson WinPE 3.0 BootLoader

    Once you have WAIK installed on a machine your Start Menu should look like the image below:

    Windows 7 WAIK Version 1

    Windows 7 WAIK Version 1

    Go ahead and launch the Windows System Image Manager. Picture of the program is below.

    Windows System Image Manager

    Windows System Image Manager

    We now need to open a Windows 7 image. If you have an installation DVD, insert it now. Or if you have an ISO of 7, go ahead and extract it to a folder on your desktop. (I recommend 7-zip). Back in Windows System Image Manager (WISM) go to the file menu and select “Select Windows Image”. You will now want to browse to the .CLG file in your Windows 7 installation (I am using Windows 7 Enterprise x64 in my example). It is located in the sources folder. See Image below.

    Selecting CLG File - WSIM

    Selecting CLG File - WSIM

    Now we need to create a new answer file. Go to the file menu and select “Create New Answer File.” Right after creating one, go ahead and simply go to file menu and select “Save Answer File.” This will give your XML file a name and save location. Now you see we have two category folders, Components and Packages. Under the Components folder you see that we have 7 options:

    - 1 windowsPE
    - 2 offlineServicing
    - 3 generalize
    - 4 specialize
    - 5 auditSystem
    - 6 auditUser
    - 7 oobeSystem

    These are very important as these are the steps in which the XML file is sequenced.

    The next part is a little confusing. You are going to add components, from under the “Windows Image” section on the bottom left hand side to the passes on your Answer File. To add a component, you can right click on them and select “add to # pass”. There are many different options you can add, but they have to be done in a certain order and pass otherwise your sysprep might fail. I am simply going to use the one I created as the example.

    Download my Windows 7 x86 Sysprep XML File
    Download my Windows 7 x64 Sysprep XML File

    WSIM Passes

    WSIM Passes

    Here is more information about adding options under the passes:

    1 WindowsPE

    Nothing required in my example.

    2 OfflineServicing

    Nothing required in my example.

    3 Generalize

    amd64_Microsoft-Windows-Security-SPP_neutral

    Set 1 for SkipRearm to allow up to 8 rearms

    4 Specialize

    amd64_Microsoft-Windows-Security-SPP-UX_neutral

    SkipAutoActivation: true

    amd64_Microsoft-Windows-Shell-Setup_neutral

    Computer Name: * (Randomly generated name, use this to test)
    CopyProfile: false (doesn’t quite work, we will do that manually later)
    Registered Organization: Microsoft (you must leave this in this section)
    Registered Owner: AutoBVT (you must leave this in this section)
    ShowWindowsLive: false
    TimeZone: Pacific Standard Time

    5 AuditSystem

    Nothing required in my example.

    6 AuditUser

    Nothing required in my example.

    7 OobeSystem

    amd64_Microsoft-Windows-International-Core_neutral

    InputLocale: en-us
    SystemLocale: en-us
    UILanguage: en-us
    UserLocale: en-us

    amd64_Microsoft-Windows-Shell-Setup_neutral

    RegisteredOrganization: YourCompanyName
    RegisteredOwner: YourName

    Under amd64_Microsoft-Windows-Shell-Setup_neutral component, you will have a subheader for OOBE:

    HideEULAPage true
    NetworkLocation: Home
    ProtectYourPC: 1

    Under amd64_Microsoft-Windows-Shell-Setup_neutral component, you will have a subheader for UserAccounts:

    You will want to add both an administrator password and another local account with administrator rights and password.

    If you have questions, look at my image above to see full layout of components, it should help. Also, you might have additional component headings that I didn’t mention. If you are simply testing first time, just delete them for now. You can add all sorts of components later on, you should do a successful sysprep if this is your first time, better to keep it simple and to the basics.

    K, now go ahead and save your answer file. The building of the XML file is now done. That is the worst part. You would think that the sysprep process would get easier as new OS’s come out, but its pretty much the exact opposite.

    Prepping your machine

    K, now it is time to get your machine that you want to sysprep and capture an image of ready to go. First, you are going enable the administrator account on the computer. To do this on Windows Vista or Windows 7, open up a command prompt (Run as Administrator) and input the following command:

    net user administrator /active:yes

    Hit enter and you should see “successfully enabled Administrator Account”.

    So you should currently have two accounts on your computer. The account you are currently logged into and the Administrator account which you just enabled. You are going to want to customize all of your preferences, favorites, bookmarks, taskbar, etc. under the currently logged in account. Once you have everything just perfect, you are going to reboot the computer and login to the administrator account. This next part is very important. You are going to go to “My Computer” and then to Organize and folder and search options. Go ahead and select “Show hidden files, folders, and drives”. Picture is below.

    Show Hidden Files, Folders, and Drives

    Show Hidden Files, Folders, and Drives


    No go to “My Computer” and you are going to rename the Default folder to Default.bak (The CopyProfile setting in Sysprep on Windows7 does not seem to work yet). Next, copy your other user account, the one you customized everything in, right click on it and select copy. Then paste within that same window. It is going to come out as USERNAME – COPY. Now rename this copied folder to Default. Now after you sysprep your computer it will create all new accounts from that default profile folder using all your customized options.

    The last thing we need to do is disable the WMP sharing service. This is a bug in Windows 7 and hopefully will eventually be fixed. If you don’t disable this before the sysprep your sysprep will simply fail to run. Go to run, msconfig, and then disable the “Windows Media Player Networking Sharing” service.

    Now you are ready to sysprep your computer and capture an image of it!! Finally! So, grab that XML file you created earlier and you are going to place it on the machine you built your image on. Copy or move it to : C:\windows\system32\sysprep.

    Now to run sysprep, navigate to that sysprep folder, hold SHIFT and right click and select “Open New Command Windows Here”.
    Next, input the following commands:

    sysprep /generalize /oobe /shutdown /unattend:NAMEOFYOURANSWERFILE.xml

    Your computer will now run the sysprep process, removing SID, etc, and then shutdown. You can have it restart, but shutdown is always safer if you have a ton of things going on. You will need to boot to your WinPE Boot environment when your computer starts back up. If you miss the first time upon boot up, you will have to re-input your sysprep commands. So do a shutdown, not a restart.

    You can use my BrianLeeJackson WinPE3.0 BootLoader to boot up from USB or CD and capture your image. Once you capture your image, you are all done. You now have a sysprepped Windows 7 image. I have performed this task on over 120 computers so far and it has been flawless. The hard part was getting everything configured correctly. I hope this documentation helps someone out there, I know I would have killed for a tutorial like this when I first started :)

    Share and Enjoy:
    • Twitter
    • Facebook
    • Digg
    • del.icio.us
    • Technorati
    • StumbleUpon
    • Google Bookmarks