Archive for the ‘Windows 7’ 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

    Sysprep Windows 7 – Third Party Anti-Virus

    Friday, November 13th, 2009

    I have run into about 20-30 people over the last couple weeks that were having trouble sysprepping and they all narrowed it down to the same thing; their anti-virus application. It seems that the Sysprep tool is sometimes not working with a lot of the 3rd party anti-virus applications.

    Anti-Virus Applications with Known Issues

    • Norton 2009
    • McAfee
    • AVG
    • Avira
    • ESET NOD32 4.0 (User reported issues)

    Anti-Virus Applications 100% Compatible with Sysprep

    And yes, you probably noticed that both applications are made by Microsoft, go figure. If anyone notices any other anti-virus programs that are causing issues with sysprep please comment on here. Or if you have workaround for these anti-virus apps and sysprep working together please comment.

    Microsoft Security Essentials - Free Alternative

    Microsoft Security Essentials - Free Alternative

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

    Windows 7 Resource Kit – My Blog in a book!

    Wednesday, November 4th, 2009

    I have been blogging a lot over the past year about my experiences with Windows 7, WinPE 3.0, etc. The first reason I started blogging was not only to document for myself but also because I was trying to save others some time. Well, the good news is that Microsoft finally decided to document all these topics. If you haven’t already, drop by Amazon and buy this book:
    Windows® 7 Resource Kit. It is literally my blog in a book with much more detail! Everyone that has asked me questions on this blog, 99% of the answers for them are in this book. It is 1700 pages long, and worth every page. The paperback edition includes a CD in the back with over 250 powershell scripts and an eBook of the entire book.

    Windows 7 Resource Kit

    Windows 7 Resource Kit

    Here is the layout of the book:

    Chapter 1: Overview of Windows 7 Improvements
    Chapter 2: Security in Windows 7
    Chapter 3: Deployment Platform
    Chapter 4: Planning Deployment
    Chapter 5: Testing Application Compatibility
    Chapter 6: Developing Disk Images
    Chapter 7: Migrating User State Data
    Chapter 8: Deploying Applications
    Chapter 9: Preparing Windows PE
    Chapter 10: Configuring Windows Deployment Services
    Chapter 11: Using Volume Activation
    Chapter 12: Deploying with Microsoft Deployment Toolkit
    Chapter 13: Overview of Management Tools
    Chapter 14: Managing the Desktop Environment
    Chapter 15: Managing Users and User Data
    Chapter 16: Managing Disks and File Systems
    Chapter 17: Managing Devices and Services
    Chapter 18: Managing Printing
    Chapter 19: Managing Search
    Chapter 20: Managing Windows Internet Explorer
    Chapter 21: Maintaining Desktop Health
    Chapter 22: Supporting Users with Remote Assistance
    Chapter 23: Managing Software Updates
    Chapter 24: Managing Client Protection
    Chapter 25: Configuring Windows Networking
    Chapter 26: Configuring Windows Firewall and IPsec
    Chapter 27: Connecting Remote Users and Networks
    Chapter 28: Deploying IPv6
    Chapter 29: Configuring Startup and Troubleshooting Startup Issues
    Chapter 30: Troubleshooting Hardware, Driver, and Disk Issues
    Chapter 31: Troubleshooting Network Issues
    Chapter 32: Troubleshooting Stop Messages

    In my opinion this book could be priced a lot higher for all the information it has in it. If you are nerdy enough this would make a great stocking stuffer :)

    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

    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

    UVNC SC working slow in Windows 7 Environment

    Saturday, September 26th, 2009

    Some of you may have noticed the UVNC SC working slow between windows 7 machines. To fix this, you simply need to recompile your HelpDesk.exe and download the latest version of UVNC client.

    Rudi De Vos over in the UltraVNC forums posted a fix for this problem.

    Also, here is the link for the newest version of UVNC.

    I have tested Rudi’s fix in test environment and we are now using this in production environment within Windows 7 environment and it is working great. Thanks Rudi!

    UVNC Listener

    UVNC Listener

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