OSD-Tips
Priority:
1. Unattended.xml goes above nothing
2. CustomSettings.ini goes above Unattended.xml
3. Database goes above CustomSettings.ini and Unattended.xml
4. Task Sequence Variable, goes above Database, CustomSettings.ini and Unattended.xml
Imagex command
imagex [flags]
{/append | /apply | /capture | /delete | /dir | /export | /info | /split | /mount | /mountrw | /unmount} [parameters]
check
Checks the integrity of the .wim file. If not provided, existing checks are removed.
config
Specifies the name and the location of the configuration file. You can rename this file, as necessary.
/verify
Enables file resource verification, by checking for errors and file duplication.
/compress [maximum | fast | none]
1. Specifies the type of compression used for the initial capture operation. The maximum option provides the best compression but takes the longest time to capture the image. The fast option provides faster image compression but the resulting files are larger than those compressed with the maximum option. This is also the default compression type, used if you leave this parameter blank. The none option does not compress the captured image at all.
/scroll
Scrolls output for redirection.
For example
imagex /capture C:\ d:\imaging\data.wim "Drive D" /verify
imagex /compress fast /flags "Ultimate" /check /scroll /capture c: d:\install.wim "Windows Vista Ultimate"
DISM (offline patch and driver update)
Mount wim
dism /mount-wim /wimfile:C:\test\Win7.wim /index:1 /mountdir:C:\test1\
Add package
dism /image:C:\patch\UK /add-package /packagepath:C:\patch\IE\Windows6.1-KB2533623-x64.msu
Unmount and commit
Order of Operations in Windows PE
The boot process of Windows PE is as follows.
- The boot sector on the particular media is loaded. Control is passed to Bootmgr. Bootmgr extracts basic boot information from the Boot Configuration Data (BCD) and passes control to the Winload.exe file contained in Boot.wim. Winload.exe then loads the appropriate Hardware Abstraction Layer (HAL), and loads the System registry hive and necessary boot drivers. After it finishes loading, it prepares the environment to execute the kernel, Ntoskrnl.exe.
- Ntoskrnl.exe is executed and finishes the environment Setup. Control is passed to the Session Manager (SMSS).
- SMSS loads the rest of the registry, configures the environment to run the Win32 subsystem (Win32k.sys) and its various processes. SMSS loads the Winlogon process to create the user session, and then starts the services and the rest of the non-essential device drivers and the security subsystem (LSASS).
- Winlogon.exe runs Setup based on the registry value HKLM\SYSTEM\Setup\CmdLine. Winpeshl.exe will launch %SYSTEMDRIVE%\sources\setup.exe if it exists, otherwise it looks for an application specified in %SYSTEMROOT%\system32\winpeshl.ini. If no application is specified, Winpeshl.exe will execute cmd /k %SYSTEMROOT%\system32\startnet.cmd. By default, Windows PE contains a Startnet.cmd file that will launch Wpeinit.exe. Wpeinit.exe loads network resources and coordinates with networking components like DHCP.
- When Wpeinit.exe completes, the Command Prompt window is displayed. At that point, the boot process of Windows PE is complete.
Windows PE startup process was something close to this:
- Windows PE started CMD.EXE to run STARTNET.CMD.
- STARTNET.CMD started WPEINIT.EXE.
- WPEINIT.EXE initialized networking and optional components, then ran “WSCRIPT.EXE X:\Deploy\Scripts\LiteTouch.wsf”.
- LiteTouch.wsf started a minimized CMD.EXE, for troubleshooting, then runs the Welcome or Deployment Wizard.
That meant that there was always a command window visible on the screen, as well as another minimized one that could be used for troubleshooting. Some didn’t like that cluttered look, so they hooked in utilities to hide these command windows.
With MDT 2010, that will no longer be necessary. The startup process has been modified:
- Windows PE starts BDDRUN.EXE.
- BDDRUN.EXE starts WPEINIT.EXE.
- WPEINIT.EXE initialized networking and optional components, then ran “WSCRIPT.EXE X:\Deploy\Scripts\LiteTouch.wsf”.
- LiteTouch.wsf runs the Welcome or Deployment Wizard.
BddRun.exe: – Will launch wpeinit.exe. It will also remain in memory and monitor the keyboard for F8
WpeInit.exe:- will start up the network, and other services and parse the unattend.xml file for commands to run.
DaRT
Microsoft DaRT is based on Windows Preinstallation Environment.
· Registry editor: Edits Windows Registry
· Locksmith: Resets a user account's password
· Crash Analyzer: Analyzes crash dumps
· File Restore: Restores deleted files
· Disk Commander: Repairs volumes, master boot records and partitions
· Disk Wipe: Irrecoverably erases data from hard disk
· Computer Management: A group of utilities that help retrieve system information, enable, disable or manage device drivers, Windows services and software that run during computer startup, inspect the event logs of the offline system and manage partitions.
· Explorer: A file manager
· Solution Wizard: A guidance tool that helps user choose the proper repair tool
· TCP/IP Config: Displays and modifies TCP/IP configuration
· Hotfix Uninstall: Uninstalls Windows hotfixes
· SFC Scan: Revives corrupted or deleted system files by copying them from the Windows installation source
· Search: Searches a disk for files
· Defender (formerly Standalone System Sweeper): An antivirus that scans a system for malware, rootkits, and potentially unwanted software. Uses the same engine as Microsoft Security Essentials and other Microsoft antivirus products

Unattend.XML
Installation Phases
1- WindowsPE: Answer file settings for the windowsPE configuration pass are used to configure how the Windows Preinstallation Environment behaves. Most of the settings needed for answer file is under x86_Microsoft-Windows-Setup.
2- OfflineServicing: Within this phase, hotfixes, language packs, windows updates, additional drivers can be installed. Most of the settings needed for answer file is under x86_Microsoft-Windows-Shell-Setup.
3- Generalize: This pass is closely tied to using the sysprep /generalize command. We use this pass to create a basic Windows image. After this pass, specialize pass is used to customize the basic image for different purposes.
4- Specialize: We use this pass to do system based customizations (i.e. network settings, domain membership etc). This pass corresponds to the second part of the second phase (online configuration phase) of Setup.
5- auditSystem: This pass happens only when Setup is running in audit mode using the sysprep /audit command. Audit Mode is a special mode that customizations are made on Windows installation. Customizations in this pass are made under system account before any user logon.
6- auditUser: This is almost the same with auditSystem. The customizations in this pass are made under the user account after logon process.
7- OObeSystem: This corresponds to the last phase of Windows installation process and is used for customizations in this phase.
creation,HideOEMRegistrationScreen, HideOnlineAccountScreens,HideWirelessSetupInOOBE
- Difference between Litetouch.wsf and Litetouch.vbs
Clean existing Minint directory and clean the previous TS. Litetouch.vbs will check the prerequisites for deploying new OS installation and then Trigger the Litetouch.wsf
- Computer name should not exceed more that 15 digit but for vm serial number is more than 15
LOGS
Log file |
Description |
Location |
Setupact.log |
Primary log file for most errors that occur during the Windows installation process. There are several instances of the Setupact.log file, depending on what point in the installation process the failure occurs. It is important to know which version of the Setupact.log file to look at, based on the phase you are in. |
Setup (specialize):X:\Windows\panther Setup (OOBE), LogonUI, OEM First Run:%windir%\panther Out-Of-Box Experience (OOBE):%windir%\panther\unattendGC |
Setuperr.log |
High-level list of errors that occurred during the specialize phase of Setup. The Setuperr.log file does not provide any specific details. |
Setup (specialize):%windir%\panther Setup (specialize):%windir%\panther Setup (OOBE), LogonUI, OEM First Run: %windir%\panther |
Setupapi.offline.log |
Driver failures during the Component Specialization sub-phase of the Setup specialize phase. |
%windir%\inf |
Cbs_unattend.log |
Unattended-setup servicing failures. |
%windir%\panther |
Setupapi.dev.log |
Driver failures during the oobe phase of Setup. |
%windir%\inf |
Sessions.xml |
An XML-based transaction log file that tracks all servicing activity, based on session id, client, status, tasks, and actions. If necessary, the Sessions.log file will point to the DISM.log and CBS.log files for more details. |
%windir%\servicing\sessions |
CBS.log |
Servicing log file that provides more details about offline-servicing failures. |
%windir%\panther |
Driver injection works as follows: When a machine is booted via the Litetouch media, PNPEnum.exe collects a hardware inventory of the devices in that machine to determine which drivers will need to be injected in to the image before the image is installed on the target machine. By default the inject driver step in the task sequence will query for driver matches in the “All Drivers” Selection Profile. So by default, you could get away with dumping all of your drivers in to the Out-Of-Box Drivers node of MDT and have most deployment scenarios install with the correct driver. In reality, this is a horrible way to approach driver management. The reason I say that is because sometimes you will have multiple drivers that state via their INF file that they will work for a particular device (PNPID),
UILanguage:- UILanguage specifies the default system language to display user interface (UI) items (such as menus, dialog boxes, and help files).
Difference between Run, RunOnce, Active Setup and RunOnceEX
Run: Runs the command or code each time a user logs in the machine.
RunOnce: The command or code runs once for current logged in user and clears the registry key as soon as the command is run successfully.
RunOnceEx: clears the registry key on completion of the command.
Active Setup: The Key runs once for each user in the machine.
Tatoo: - Identification and version info.
Difference between Litetouch.wsf and Litetouch.vbs
Litetouch.vbs will clean the old MININT folder and check the pre-requisites; if meet the pre-requisites then will trigger the Litetouch.wsf and start the Task sequence.
Find the Installed Application version from Registry:-HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall
Diver management in MDT
The DevCon utility is a command-line utility that acts as an alternative to Device Manager. Using DevCon, you can enable, disable, restart, update, remove, and query individual devices or groups of devices. DevCon also provides information that is relevant to the driver developer and is not available in Device Manager.
Install and uninstall strings in Registry
Mount wim file using dism
Load hive: - after making changes in the registry from offline
Unload Hive - after removing any registry key from regidit in offline
Variable for Reboot machine : smsts reboot message
Hardware details and BIOS version
HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System
.Inf : it is main file which will configure the devise attach top that hardware.
.Sys :- Information for that driver like PnP id ..etc.
.Cat :- it tells that driver has been tested by the Vendor.
Sysprep Log Files
The Sysprep tool logs Windows Setup actions in different directories, depending on the configuration pass. Because the generalize configuration pass deletes certain Windows Setup log files, the Sysprep tool logs generalize actions outside the standard Windows Setup log files. The following table shows the different log file locations that are used by Sysprep.
Item |
Log Path |
Generalize |
%WINDIR%\System32\Sysprep\Panther |
Specialize |
%WINDIR%\Panther\ |
Unattended Windows Setup actions |
%WINDIR%\Panther\Unattendgc |