FOG .29 & .32 My Windows 7 Guide (32/64 Bit) DocV1


OK so lots of people including me have been having issues with Windows7 deployment using FOG (This guide covers versions .29/.32) I spend two days on this due to conflicting information on the FOG website/support forum. Although I found everyone very helpful !!

It would be good for you to read this all before you start your image (I recommend the virtual box idea)


So this is the settings that worked for me A-Z and some things I found out on the way…

Basic overall of this document

Step One - Installing Windows
Step Two - Using Sysprep
Step Tree - Cleaning PC for Deployment
Step Four - Upload Settings

Something to think about!
Your possible Questions

Step One – Install / Make Ready Windows 7 (32/64 Bit)

1. Install Windows7 (32Bit/64Bit) from CD,
2. Allow windows to create the 100MB partition.
3. Use the rest of the disk for the C, Don't have any other partitions
4. Complete Install, bla bla bla
5. Name the PC and create the first user. for this document call it "admin"

At this point personally I would enable the administrator account in windows > set password > login as administrator > can use the enabled administrator account from now on. (leave the admin account where it is, we will use it later)

So if you did my step or not your at the Windows 7 desktop as an administrator

6. Install All Required software
7. Install All Updates
8. Install Drivers ( If not doing in sysprep) - I just do it now.
9. Install FOG Service (Don't bother to start service now)
Base build "ready"

Step Two – Sysprep
you only need to create a sysprep unattend.xml file if you want your install to finish at a “login stage” instead of a “manual complete Windows install stage” – I recommend using an unattend.xml
On another machine download and install Automated Installation Kit (AIK) for Windows® 7
Important Note: I’m told If you are building a 32bit image then you will need to install and configure on a 32-bit OS, Same for the 64-Bit. But it’s easy to convert a x32bit XML into a x64Bit XML file or the other way around. just changing all “x86” records in the XML to “x64” will make a 32-bit XML into a x64 bit XML.

For more help with making the sysprep document I would read this for idea’s. I did not do the audit mode section. I Just created the XML file.

I have another good video source  Link to Video | Link to site
Below is a basic outline of what I did with sysprep.Download my unattend.xml (usable)
Important Note: I have removed passwords from my unattend.xml, so you need to edit.

1. Set Owner Information
2. Enable the administrator account and set password
3. Skip Activation
4. Hide License Info
5. Protect PC = 1 (basic protection)
6. Network Location = Work
7. Hide Wireless Setup
8. Set Language to UK
9. Show Windows Live = false

10. Skip Rearm = 1
This allows you to run sysprep more than 3 times on a machine, but i would recommend NOT using it.

11. copyprofile=true
copy profile will copy the administrator profile on sysprep and make it the default for any new user login. could be handy (i will use)

Important Note: Please note SkipReam & KMS
copy the finished unattend.xml to the “system32\sysprep” folder – keep a backup

Step Three – Cleaning PC for Deployment
So at this point we have a PC with windows7(32/64Bit) loaded with all your software , updates and settings ready. You should also have a unattend.xml file in the correct location.

I would recommend

1. Disable UAC
2. Disable System Restore
3. Disable Firewall
4. Disable Windows Updates
5. Disable Any software updates (e.g adobe updates)
6. Empty Recycle Bin
7. Clean Temp Folders
8. Clear Windows Update Uninstaller Files
9. Defrag C
10. Chkdsk C
11. Clear Event Logs

== Run below commands to clear Event Logs via Command Prompt
wevtutil cl Application
wevtutil cl Security
wevtutil cl Setup
wevtutil cl System

Please follow this link for the FOG guide to a clean system (for more idea’s)

My last cleanup action is to clean the “administrator” profile

1. Login as that admin account we setup & left. 
2. Take a copy of the "administrator" profile as a backup.
3. Go into system settings & Manage user profiles section & then delete the administrator account data.
Then Log back in as administrator and setup the last tweaks like use small icons, show run command etc….

Step Four – Upload Settings
OK, so almost done.
On your image you need to run sysprep regardless of creating the unattended file.

MEGA WARNING: If your not using the SkipRearm in your unattend.xml you will be locked out of using sysprep after 3 preps. but i would recommend not using SkipRearm. Use Virtual Box to undo the sysprep once uploaded (snapshots).

1. Open Command Prompt
2. type "cd c:\windows\system32\sysprep"

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

======= OR =======

3. sysprep /generalize /oobe /shutdown

The PC will complete it’s task and shutdown. Leave it there.
Now on the FOG server complete the following:

1. Create a new Image
2. Name it etc...
3. Select Windows 7
4. Select NTFS Single Partition from the list.
5. Assign the Image to the computer and Start an Upload Job.

Boot the PC and boot to PXE to upload image.  All done and now you can deploy..

Something to think about!

1. IMAGE CONTROL - I said that sysprep only lets you run 3 times before it's unusable. This is true, but instead of saving to another drive or something. I have downloaded VirtualBox and created my master image as a virtual PC. This works fine. I went with VirtualBox because it's free and i lets you take snapshots. So just before you run sysprep you take a snapshot. Once uploaded you just undo the snapshot and your ready to modify again. You can also export your image at any snapshot point to backup as a single file. VirtualBox runs on windows and Linux. You will need to download the expansion pack so you can the PXE feature. This has to be the best way of keeping your image safe and sysprep free. (oh and you can jump back to an old snapshot if your last image update failed for some reason) - TESTED AND CONFIRM WORKING

2.FINISHING UP - So I use FOG to add my PC's to the domain. All well and good but when it's finished the PC is left at login (don't want to use auto off idle settings in fog), anyway in my unattend.xml I added a command to add some domain login details to auto login. So once FOG has rebooted the PC twice to get it on the domain, the PC will login and run another script I have placed. The PC locks so no one can play with it. This script then runs any installs I need to run after (e.g Anti-Virus Agent), then removes the auto login details and shuts down. This is simple to do. If you interested let me know and i'll give you a hand and the script I have made.

3.COPY PROFILE - Some software leaves information in your profile. I was finding that domain users logging into a new image for the first time was taking a long time. I then found the profile size was 600MB. So evey time a new user is created the PC has to make a 600MB profile for them, this takes time. (2 mins) So remember to clean the administrator profile before you image; if you use the copy profile function in then unattend.xml. Now my administrator/default profile is only 20MB (20 Sec first login)


1. Sysprep can only be run 3 times on a Windows 7 install if the SkipRearm is not used.

2. Sysprep disables the default Administrator account so if you use, you need to enable in the unattend.xml

3. in the unattend.xml I set PC-name as * --This means windows will pick a random name, this is fine because FOG will rename it for you.

4. my unattend.xml has no passwords so you need to edit them using the software or notepad (software best)

5. Once you have deployed the image the unattend.xml is still on the machine with import info like passwords etc.. (c:\windows\system32\sysprep & c:\windows\panther\) DELETE THEM

6. If your thinking of using a Virtual Environment for your master image, It has been reported FOG doesn't like scsi controller settings. Select IDE as your Virtual HDD connector - Not personally confirmed.

7. If you are using KMS or planning on using a KMS server, don't use the skiprearm. (so set it to 0). Now if you have this on and your using KMS, Your KMS server will think all the hosts are the same host. We got out of this jam by making the change & then deploying 25 hosts. All our other machines kicked in as they all thought they where host 26.

8. You still have another "admin" account on your image that you don't needs. A) delete it before upload. B) Use GPO to remove account on deployment. (i use option B)

Let me know if there is anything you would like to add !

Your possible Questions

Do I need to use Sysprep? I’ll put it another way, I spent two days trying to make it work without sysprep and then as soon as i used it, it worked. For a test you could sysprep without anser file just to check it will deploy OK. once tested and OK, then create unattend.xml

Set Image Type to Vista? Again I tried but did not need it once I completed as above. It didn’t work when i tried vista and no sysprep.

What about Fogprep? I didn’t run it. I did try using it but it didn’t seem to do anything that sysprep didn’t do. Frogprep’s main use is to delete all records from the registry key “[HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices]”. You could run it before sysprep if you wished, I just don’t see it’s use.

Did you try running the following as people say do?
bcdedit /set {bootmgr} device boot
bcdedit /set {default} device boot
bcdedit /set {default} osdevice boot

I did try them but the didn’t seem to help or hinder…

Did I Need to install NETDOM? Nope, Versions above .28 do not need it. The FOG service does it.


Print Friendly, PDF & Email
  • Trackback are closed
  • Comments (50)
  1. Just looking over your list… I think you mean NETDOM not NEDOM. And I don’t know about .30 but I can assure you that you need it in .28 and .29, fogtools uses NETDOM to do the name changing work. Without it fogtools won’t work.

    • Kyle Wadman
    • May 21st, 2011


    Thanks for the correction of NETDOM.

    Although I must disagree about needing to install the NETDOM on windows7.

    1. I’m sure in my two days of testing I didn’t install NETDOM and the PC did rename and Join domain everytime. (always had FogService)

    2. At the bottom of the manual on FOG (4 lines up)
    It says, versions above .28 don’t need NETDOM.

    If you can show me me some other details to suggest you do I will look into it.

    On the hole, what do you think?

    • Dave Kap
    • May 21st, 2011

    Great guide.

    About maintaining an image in virtualbox, can I ask if you’ve tested this and confirm you are able to upload the image to fog?

    It’s just that I’m doing the same thing but tried maintaining the image in VMWare ESXi 4 (on a server), whenever I try to upload it just flashes by and completes way too quickly, so I figured I might just keep a reference machine (physical) around to maintain a build. If you can confirm the virtualbox way works this will be great news, I’ll then export an OVF of my existing build into Virtualbox 🙂

    • Kyle Wadman
    • May 21st, 2011

    @Dave Kap

    Thanks, I can confirm Virtualbox works with FOG Upload and Download (Dell Optiplex 780’s & Shuttles). We also tried using our ZEN server and failed, But this was when I was still perfecting the process. I would have thought VMWare and ZEN would work.

    In my VBOX I created the HDD to mirror our smallest physical HDD. I then test deployed to the smallest (80GB) & largest (250GB) and both worked. Not sure if you have to do that with the above, but it’s just the first way I tried.

    Please note that I only JUST completed this yesterday, So next week will be a few more test and updates to my post to keep an eye out for changes.

    • ryaz101
    • May 21st, 2011


    This worked for us without any issue, and sysprep can run more that three time, just have to make sure the Rearm setting is in place

    • Dave Kap
    • May 22nd, 2011

    Can confirm making the drive 60GB+ works for ESXi 🙂
    Your guide was helpful in setting me straight.

    ryaz101, I wish I thought of that first, maybe in my situation I should of done the setting to 20, (20% of 50GB to equal 60GB). Any how, hope this information is useful for anyone out their maintaining reference builds in a vm.

    Thanks Guys
    Much Appreciated

    • Dave Kap
    • May 22nd, 2011

    Just wondering has anyone had any success downloading images to a VM? Now that I got the upload working, would really like to be able to download. I basically set a 65GB Hard drive, and the rest is just a default VM settings (VMware ESXi). Any advice would be much appreciated

    • Kyle Wadman
    • May 22nd, 2011

    @Dave Kap

    This is something i’ll be testing this week. I’ll be testing using Virtual-box and Citrix Zen. But If they work I don’t see why VMWare wouldn’t. I will update on my findings.

    • Dave Kap
    • May 22nd, 2011

    ok, fog doesn’t like scsi hdd’s, making it IDE allowed me to download an image from Fog to a VM in ESXi!!! Note, I made two settings and didn’t check each time (sorry) but I also made the hard drive thick provisioned. Hope this helps

    • Kyle Wadman
    • May 22nd, 2011

    @Dave Kap
    Thanks Dave Kap,
    I have added it to my warning list.

    • BOB
    • May 22nd, 2011


    Best windows 7 FOG guide I have found!

    Thank you, Thank you, Thank you.

    • Kyle Wadman
    • May 22nd, 2011


    🙂 Glade I could help

    • Peter B
    • May 23rd, 2011

    Tested and confirmed this guide works.. Thanks Kyle

    • Dave Kap
    • May 24th, 2011

    From esxi it does raw mode no matter how the hdd is configured, thin or thick 🙁

    Can I ask if you was able to successfully upload to fog from virtualbox:

    – using the windows 7 setting in fog
    – and have it resize the partition successfully
    – during the upload it correctly detected the file system as NTFS (instead of RAW)?

    If so I will probably dump my esxi solution.

    • Kyle Wadman
    • May 25th, 2011

    @Dave Kap

    I use VirtualBox now and it’s fine.

    1. Yes, I pick Windows7 in FOG, but i don’t see why this is a show stopper.

    2. Yes, when you sysprep the image before upload, once it downloads it resizes.

    3. Yes, the upload is NTFS and because i’m using .29 it’s also GZIPPED.

    • Dave Kap
    • May 25th, 2011

    This is great to know, thanks Kyle. Will give this a go in the office tomorrow 🙂

    • ucjb
    • May 26th, 2011

    Nice job cheesesteak, worked like a charm.

    • Scott S
    • June 14th, 2011


    Just wanted to mention that building your W7 master image with VMWare Workstation works as well. I followed your guide and everything appears to be working just fine

    Just one note of caution! If you are using VMWare, make sure you do not let VMWare Workstation do an “easy install” of your Windows 7 installation. If you do, the additional 100mb partition will not be created. Not allowing this partition to be created will cause issues when you try to upload your master image. Fog looks for that 100mb partition when you upload a W7 host. If it doesn’t exist, the upload will fail (blue upload screen flashes and restarts the system). Several hours of frustration until we figured that out!

    • Scott S
    • June 14th, 2011


    As a follow-up to my last post, I have successfully used SCSI as my HDD connector in VMWare on Fog 0.29. I was able to upload and deploy the image with no issues. Again, that’s for VMWare workstation only. I don’t know about Virtual Box or any other virtual environments.

    • Shane
    • July 18th, 2011

    You mention not using fog to do the backup before you run sysprep, I use fog and it works perfectly each time. I do however run fog prep before I upload so perhaps that has something to do with it. I now have a pre-sysprep image and a deploy image for each machine type in fog.

    • Chris
    • July 28th, 2011

    Is a Volume License of Windows 7 required to use FOG?

    • Kyle Wadman
    • July 28th, 2011

    Nope. Fog is os independent.

    • Kyle Wadman
    • July 28th, 2011

    I use mak…

    • J-R Francoeur
    • October 7th, 2011

    Cool tutorial! 🙂 Thanks for the good explanations and advices!

    • Charles
    • October 27th, 2011

    Scott S :Kyle,
    As a follow-up to my last post, I have successfully used SCSI as my HDD connector in VMWare on Fog 0.29. I was able to upload and deploy the image with no issues. Again, that’s for VMWare workstation only. I don’t know about Virtual Box or any other virtual environments.

    I’ve tried VMWare Workstation with SCSI drive and when I go to perform full host registration it can’t find the hard drive. What kernel did you use for PXE?

    • Kyle Wadman
    • October 30th, 2011

    The basic kernel with .32

  2. I am curious how you got the Admin profile down to 20mb. I think I have done all you suggested and mine is still at 180mb

    • Kyle Wadman
    • November 9th, 2011

    @Sandi Trogdon
    I created another account called admin. I then login as the admin account. Go into system settings & Manage user profiles section. I then delete the administrator account.

    Log back in as administrator and setup the last tweaks like use small icons etc….

    remove/disable the admin account and your profile will be about 20mb.

    (backup the profile first in case any applications have installed something required into the profile. Normally fine to delete)

    The document has been changed to make this better now.

  3. Deleting the administrator account doesn’t cause the temporary profile problem that I have seen in Win7?

    • Kyle Wadman
    • November 9th, 2011

    @Sandi Trogdon
    Indeed deleting the folder will have the issue you are speaking of. But doing it this way is the Microsoft supported way..

    If you do delete the profile folder manually, open regedit and goto

    HKEY_LOCAL_MACHINE \ SOFTWARE\ Microsoft\ Windows NT \ CurrentVersion \ ProfileList

    Look inside the SID folders and you will find the username. Once located, delete that folder and login as the user and it will recreate the profile without issue

    • Chris
    • January 6th, 2012

    I just need a little clarification on the admin account. Getting confused as it seems you’re referring to both accounts as “admin” and as “administrator”. Are these the correct steps?

    1. Create a user named “admin” during Win7 installation.
    2. Enable the built-in “Administrator” account.
    3. Sign in as the built-in “Administrator” account.
    4. Delete the “admin” account that was created in step #1.
    5. (fast forward)Cleanup of the “Administrator” account by deleting it? – This is where I get confused because I can’t delete this account unless I log in as another account, which I no longer have from deleting it in step #1 (per your instructions.)

    By the way…great guide!!!!

    • Kyle Wadman
    • January 6th, 2012

    Indeed you are 100% correct, i think I need to rewrite this section.
    The 2nd section was added to the document after I found the issues.

    I created an admin account & then used that to clean the administrator. I then delete the admin account again once back in as administrator.

    (Infact thats a lie because now i leave the two accounts on my image & when it’s deployed, GPO removes the “admin” account for me, leave just the one administrator account on the end users computer.)

    Hope that helps.

    • Chris
    • January 6th, 2012

    Ahhh…that sounds better. Thanks for your quick response!!

    On a side note, have you come up with a way to create one image for multiple models of computer? An all inclusive image that includes the drivers for several different models? I’ve seen some guides online, but they seem to be all over the place. Not being able to do this isn’t a deal killer, but it would be nice to only manage one image, rather than 3 or 4.

    • Kyle Wadman
    • January 6th, 2012

    Due to using sysprep you should be fine. We use a range of models.
    Dell Optiplex 760, 780, 790
    Dell Laptops (can’t remember models)
    HP Laptops (can’t remember models)
    Acer Laptops (can’t remember models)
    All one image.

    We have ways but nothing I can recommend without long explanations. Even Microsoft have a printer driver exporter built into windows7, but it’s buggy, but yes I have worked it out.(key = Do as local administrator only, then seems to work)

    • Chris
    • January 6th, 2012

    The one guide that made sense said to create your image on one model PC and sysprep it. Then deploy that image on the next model PC. Install the drivers for the model, sysprep it and continue on down the chain until all the different model PCs/laptops have been done.

    I’ve also seen recommendations to remove all your devices from device manager before you sysprep.

    Do either of these fall in line to what you’re doing?

    • Kyle Wadman
    • January 6th, 2012

    yes, the first one. if you got irc we can chat. or my sitre has chat

    • Mark
    • February 9th, 2012

    What about activating Windows? Am I correct to think that any machines imaged in the above way would have to have their product key set and activation done after imaging?

    • Kyle Wadman
    • February 9th, 2012

    activation is done after imaging.

    if your using MAK codes then we added to unattend.xml or finishing script (SkipRearm can be on)

    If your using KMS then the code is as is after deployment, so you just leave it, or run slmgr.vbs /ato to force KMS activation (Skiprearm MUST NOT be on)

    • james
    • February 15th, 2012

    What about using OEM windows disks to create the image, like the Windows 7 Pro disk that comes with a dell pc?

    So the best way to add drivers for multiple hardware configurations?? create one and then deploy onto another and load drivers again?

    • Kyle Wadman
    • February 16th, 2012

    If all your hosts are OEM then fine, you can use it. But remember the OEM code is only valid on ONE machine.
    You could script the input of the correct code for that machine but it would be a little messy. But possible.

    I would recommend purchasing KMS/VLK licences, but you already have a licence in OEM so it’s extra cost for no return.

    In response to drivers, Yes you can go from PC to PC but again this is messy. For example DELL let you download cab files of drivers for their PC’s. So with this CAB, you would extract all to system32 and then
    when you sysprep and boot it would find the drivers. So basically, if you can get the drivers on the image yourself then you don’t need to keep moving the image around.

    Or look at slipstreaming drivers (i’ve never done)

    Hope that helps

    • Jack
    • May 11th, 2012

    Things go well until I deploy. I then get this error message when the client starts to go through set up.

    Windows could not finish configuring the system. To attempt to resume configuration, restart the computer.

    When i restart it just repeats the error.

    This happens when I sys prep and install and unattend.xml file. The Sysprep goes fine, I see the “finished” file on the root drive.


    • Kyle Wadman
    • May 14th, 2012

    Have you still got an issue?

    • Bryan
    • July 29th, 2012

    I’m currently running .28 server and my image is XP. We have a large number of PC’s (over 5000) and they are all stand alone systems. No domain. The master image is activated and the VLK is in the unattend file so the finished deployed image is ready to login for the customer. We are moving to Windows 7 and I’m not sure if I can do the same thing for activating the OS. Can I do it the same way?

    • sylvia
    • July 31st, 2012

    This may sound like a dumb question, but if I want to create an image using virtual box, are there any directions anywhere for this? Do I install virtual box on my computer or the computer I want to create the image for? I have used virtualbox before, but mainly to run a different OS within my OS.

    • Kyle Wadman
    • July 31st, 2012

    This guide will help you from A-Z (you install vbox on any machine)

    • Kyle Wadman
    • July 31st, 2012

    Sorry for the delay in my response.

    You can use MAK codes to activate windows 7, The code would need to be yours or you add it after the install. Don’t use a KMS server.!

    • Nicola
    • August 1st, 2012

    Nice Guide, thanks a lot.
    Just use amd64 instead of x64 in 64bit unattend.xml.

    • colby
    • May 29th, 2013

    Do you not use the audit mode when building your windows 7 image?

    Sounds like you are installing as usual, setting up your profile and programs, then sysprep and upload to fog.

    Makes sense to me, but I just wanted to verify that you are not doing the setup under the audit mode.

    • Jimmy Dan Mortensen
    • June 21st, 2013

    I am very interested in knowing how you got the computers on the AD-domain 🙂 Could you send me a guide or tip and I will be forever gratefull 🙂

    Best regards
    Jimmy Dan Mortensen

    • Kyle Wadman
    • June 22nd, 2013

    No not using audit mode. Sorry for the slow reply! Blog stopped emailing me and I have only just noticed.