Netbook Deployment - maeds.org Presentation 2… · Netbook Deployment What we'll be going over: Windows Automated Toolkit ImageX AutoIT Scripting ... Creating a GUI for recovery

Embed Size (px)

Citation preview

  • Netbook Deployment

    What we'll be going over: Windows Automated Toolkit ImageX AutoIT Scripting Windows 7 configuration GRUB WinPE 3 WDS Windows Deployment Services

  • Create a WinPE CD

    Before we do anything with Windows, we need to download the WAIK toolkit. Download Link I will now go through the creation process. A walk through on the process can be found on the Microsoft site using the following link: http://technet.microsoft.com/en-us/library/dd799303(WS.10).aspx We will use copype.cmd to create the files for WinPE and oscdimg to create an ISO image.

    http://www.microsoft.com/downloads/info.aspx?na=41&SrcFamilyId=696DD665-9F76-4177-A811-39C26D3B3B34&SrcDisplayLang=en&u=http://download.microsoft.com/download/8/E/9/8E9BBC64-E6F8-457C-9B8D-F6C9A16E6D6A/KB3AIK_EN.isohttp://www.microsoft.com/downloads/info.aspx?na=41&SrcFamilyId=696DD665-9F76-4177-A811-39C26D3B3B34&SrcDisplayLang=en&u=http://download.microsoft.com/download/8/E/9/8E9BBC64-E6F8-457C-9B8D-F6C9A16E6D6A/KB3AIK_EN.isohttp://technet.microsoft.com/en-us/library/dd799303(WS.10).aspxhttp://technet.microsoft.com/en-us/library/dd799303(WS.10).aspxhttp://technet.microsoft.com/en-us/library/dd799303(WS.10).aspxhttp://technet.microsoft.com/en-us/library/dd799303(WS.10).aspx

  • Create system partitions

    Use your new WinPE CD to boot your system. We will now do the following: Use a command line utility called Diskpart

    Create 3 drive partitions 1 FAT32, 2 NTFS

    Assign Drive letters to the partitions

    Set ID's for the partitions

    Specify a partition that will be the primary boot (Active)

  • Create restore partition

    We are now going to install WinPE onto our 3rd partition. Xcopy [CDDrive]:\*.* D:\ - The drive of the 3rd partition To make it easy to update or redeploy later, I always capture the restore drive to a WIM file. Boot the PC with the WinPE CD and run ImageX to capture the restore drive. X:\imagex.exe /capture D:\ X:\WinPE.wim Restore Partition

  • Install Windows

    Install Windows to your specification

    Capture the image of the Windows installation imagex.exe /capture C:\ D:\Windows7.wim Base image

    Now you can install any custom programs DEMO: imagex.exe /apply D:\Windows7.wim 1 C:\

    file:///D:/Windows7.wimfile:///D:/Windows7.wimfile:///D:/Windows7.wimfile:///D:/Windows7.wimfile:///D:/Windows7.wimfile:///D:/Windows7.wim

  • Boot Menu

    Windows XP Boot.ini

    Windows Vista/7 BCD

    3rd party MBR

  • Install GRUB

    Download GRUB GRUBInst GRUB4DOS

    Open Command Line [MenuDrive]:\grubinst .exe (hd0)

    And before you know it, GRUB is now installed into the MBR of your system

    http://sourceforge.net/projects/grub4dos/files/grubinst/grubinst 1.0.1/grubinst_1.0.1_bin_win.zip/downloadhttp://sourceforge.net/projects/grub4dos/files/grubinst/grubinst 1.0.1/grubinst_1.0.1_bin_win.zip/downloadhttp://sourceforge.net/projects/grub4dos/files/GRUB4DOS/grub4dos 0.4.4/grub4dos-0.4.4.zip/downloadhttp://sourceforge.net/projects/grub4dos/files/GRUB4DOS/grub4dos 0.4.4/grub4dos-0.4.4.zip/download

  • Configure GRUB

    menu.lst timeout 4 default 0 splashimage (hd0,0)/One2World-Logo.xpm.gz hide (hd0,0) title root (hd0,1) savedefault chainloader +1 title Start System Recovery root (hd0,2) chainloader +1

  • AutoIT Introduction

    What is AutoIT?

    What systems can it be used on?

    How much does it cost?

    What do I need, and where do I get it? AutoIT3 - http://www.autoitscript.com Scite A free editor geared towards AutoIT

    http://www.autoitscript.com/http://www.autoitscript.com/

  • Open Scite and then open Koda.

    What's Scite and Koda?

    TCAPS Restore Partition code (2 versions) ranges from 325 to 1500 lines.

    To initiate your GUI in your restore partition open the file X:\Windows\System32\winpeshl.ini. Edit the line: [LaunchApp] AppPath=X:\restore.exe

    Creating a GUI for recovery

  • Restore Partition Code

  • Restore Partition Code

  • Restore Partition Code

    If $Data[0] = "Online" Then _CleanRestore() ElseIf $Data[0] = "Unknown" Then MsgBox(0, "Power check", "Your system is unable to determine your power settings." & @CR & "It is recommended that your laptop is on AC Power during the restore process.") _CleanRestore() ElseIf $Data[0] = "Offline" Then MsgBox(0, "Power check", "Your laptop must be on AC power during the restore process.") Else MsgBox(0, "Power check", "Error reading power.") EndIf

  • Restore Partition Code

  • Restore Partition Code

    If $Data[0] = "Online" Then _PartRestore() ElseIf $Data[0] = "Unknown" Then MsgBox(0, "Power check", "Your system is unable to determine your power settings." & @CR & "It is recommended that your laptop is on AC Power during the restore process.") _PartRestore() ElseIf $Data[0] = "Offline" Then MsgBox(0, "Power check", "Your laptop must be on AC power during the restore process.") Else MsgBox(0, "Power check", "Error reading power.") EndIf

  • Restore Partition Code

  • Restore Partition End Product

  • Customizing Windows 7 Image

    Setup account access/ restrictions Install applications/ utilities Customize Student profile Hack registry to disable UAC (VERY IMPORTANT) Create/Copy scripts that prepare system after Sysprep Capture Student Profile Sysprep machine and shutdown Capture WIM Image

  • System Scripts What do we need the script to do without user intervention? We need to prevent users from interfering with the script. Sysprep will destroy our profile changes, so we need to get them back by applying our Student profile image. Enable UAC. Turn off Internet Explorer RunOnce wizard. We need to rename our system. Re-assign permissions to the users profiles, as Sysprep breaks the permissions of non-admins. Re-arm activation Enable mouse and keyboard controls. Reboot

  • System Script Code

  • System Script Code

  • Sysprep

    What is Sysprep?

    Where can I get it? C:\Windows\System32\Sysprep

    Open Command line as Administrator. C:\Windows\System32\Sysprep\sysprep.exe /generalize /oobe /unattend:unattend.xml /shutdown

  • Sysprep Answer file

    What is an Answer file? How do we create/edit these files? Windows System Image Manager

  • Sysprep Answer file

  • Sysprep Answer file

    What options need to be set? Generalize Prepares image for deployment Specialize Customize Windows installation Oobe Setup user experience after sysprep Generalize PersistAllDeviceInstalls Stops plug and play devices being removed SkipRearm Stops Windows from using a rearm Specialize Internet Explorer Configure browser to suit needs. NOTE: DisableFirstRunWizard does not work ProductKey Enter the Volume License key for Windows

  • Sysprep Answer file OOBE Setup Locale information to en-us Setup Autologin with a 1 time login count to admin user FirstLogonCommands SynchronousLogins 1. C:\Windows\System32\CompNameChange.exe 2. cmd /c reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t NOTE: The reg hack fixes the first network prompt i.e. Public, Home, Work HideEULAPage Prevents user from having to accept license agreement HideWirelessSetupInOOBE Prevents user from setting up wireless NetworkLocation Doesn't work...Per Note above SkipMachineOOBE Prevents prompt to set computer name SkipUserOOBE Prevents prompt to setup a user account