Careful:Rant Coming Up!

Ok,so it’s really not that nice to criticize something that others have built,yet in this case
I simply can’t help it!

I have been trying to build a Vista unattended installation for a few hours now (finally I
succeeded) and at some stage I actually stopped and asked myself- is the time that it’s taking
me to build the answer file worth it? Will it really save me enough time on each and every installation
to be worth the time I am investing now?

I agree that unattended installation is more of an art then an accurate science,yet with Vista it has
turned ridiculous.
Given,unattended setups exist mostly for IT oriented people and not the average person but I would
sill expect a friendlier way to create a basic answer file upon which a more complex solution can be built
(e.g. SETUMPGR).

End of RANT(and the usual disclaimer that this is my personal opinion and nothing else…it may be
incorrect,dumb,stupid and idiotic all at once…).

Later on I intend to write about my adventures with building the answer file and actually the whole process
of building a deployment ready Vista…

Monitoring Vista’s Reliability and Health

Windows Vista provides a couple of interesting tools that can help it’s user (or an IT Technician)
with monitoring its health. I know that this comparison is going to sound a bit odd yet these
tools are similar to what a doctor uses when looking at a patient. The first tool that I will describe
is called ‘Reliability Monitor’,this tool provides the ‘patients’ history. The second tool is a report of
the current status and it is called:’System Health Report’.


Reliability Monitor

The reliability monitor will provide information about a systems history. The information provided
can be divided into two groups:quick and in-depth. The quick information you are provided with
is an index that will rate the systems reliability.
The index is a number between 0 and 10 that is affected by events that affect your system.The index
is calculated on a daily basis.
A higher index will point towards a more reliable system,while a lower index will point towards an unstable
system.

The events that affect the index(and the system) are grouped into the following categories:

  1. Software (Un)Installs
  2. Application Failures
  3. Hardware Failures
  4. Windows Failures
  5. Misc. Failures

To reach the Reliability Monitor:

  1. Right click the Computer icon
  2. Choose Manage
  3. Expand Reliability and Performance
  4. Expand Monitoring Tools
  5. Choose Reliability Monitor

image

As you can see, you can check what happened each day and what affected your system. You can identify
reoccurring issues and their interval if need be. The information itself is gathered and processed by a hidden
scheduled task called:’RACAgent’.


System Health Report

The system health report provides a report about the current state of the systems health. The report is very
comprehensive and it will note anything that seems out of order.

To build such a report(a bit too complicated in my opinion):

  1. Right click the Computer icon and choose Properties
  2. Click the Windows Experience Index
  3. On the left pane(Tasks) choose Advanced Tools
  4. Choose ‘Generate a system Health Report’
  5. Wait for approximately 60 seconds and review the report

image

image

 

Conclusion

As mentioned earlier, when reviewing a patient a doctor needs the patients history and current status, these
pieces fill the puzzle and provide a comprehensive picture about the patient. In a similar manner when an IT
representative or a home user need to tend to a system they can use the Reliability Monitor and the System
Health Report.

An Interview with Mark Russinovich (Channel 9)

I heard Mark Russinovich speak at Tech-Ed Europe in Barcelona (2003) and I found
it to be a great experience, now that he is a part of Microsoft what he has to say
has additional weight since he is a part of the team that works on the Windows kernel
and additional goodies…

I highly recommend taking the 40 minutes and watching the interview with Mark at:

http://channel9.msdn.com/showpost.aspx?postid=365911

Changes to remote administration in Windows 2008

The Terminal Services Team blog has a good post about these changes. One of the most
obvious changes is the fact that the /console switch is gone. Remote administration has always
been an valuable tool for Windows (actually since Windows 2000), the /console switch was an
improvement as it allowed you to use the console directly-but now it changes again as the /console
switch is swapped for the /admin switch.

WindowsPE – Charting a new environment

A bit late(ok,very late!), WinPE got my attention. WinPE is a subset of a Microsoft based OS, in it’s
current version (2.0)-Vista.

At it’s essence, WinPE is a stripped down version of Vista that enables you to boot a system
to an OS that is not installed on the system but still be able to manipulate this system. The OS
itself (WinPE) will be “installed/saved” on either a network, a CD or some type of flash drive.

Once started,WinPE loads into run and it provides you with a Vista like environment, to do one
of the following:

  1. Troubleshoot- a crippled system.
  2. Install Vista – More about this in a later post.
  3. Data access – Copy information from the system.

So, as mentioned, WinPE is actually an OS (one that comes free with Vista), why shouldn’t it be
used on a daily basis? Well for starters this OS provides very limited functionality and this becomes
very obvious when you start it-your shell is cmd.exe. Yet fear not,I hope to show you in this post
how to modify WinPE to make it more usable.
Another limitation imposed on WinPE is that it will restart every 24 hours,other then that trust me,
you wouldn’t want to use it as an OS…

image 
    The standard WinPE 2.0 UI

 

Part 1 – Creating WinPE

The creation of a basic WinPE medium is relatively straightforward. Use the following instructions to create it:

  1. Download the latest version of Windows Automated Installation Kit (AIK).
  2. Install it…
  3. Go to Start > All Programs > Microsoft Windows AIK > Windows PE Tools Command Prompt
    image
  4. Use copype.cmd to create the WinPE environment by copying the files for the correct platform:
    copype <x86|AMD64> <destination folder>
    image
  5. Note that at this stage we could go and complete creating WinPE yet we would end up with a very
    basic OS with no additional tools (or in the words it would be cool but it wouldn’t be useful).

Part 2 -Customizing WinPE: Adding tools

The simplest way to customize WinPE is to copy the files of the tools you want to use into the WinPE
image. To be able to so so you need to mount the Windows Imaging format (WIM) image of what you created
in stage 1 (more on this in a later post) then copy the files.
Use the following instructions:

  1. We will be using imageX to mount the image (prepare a directory into which you will mount the image):
    imagex /mountrw e:\winpe_x86\winpe.wim 1 e:\mount
    image
  2. Copy the files you need to a directory in the mounted image.
    [I created a folder called ‘Tools’ under the ‘Windows’ directory.]
  3. Among the tools I copy are:
    1. imageX – c:\Program Files\Windows AIK\Tools\x86
    2. imageX GUI- If you are into a GUI(which I am), download it at(don’t forget to copy wimgpai.dll):http://www.autoitscript.com/gimagex/
    3. A good file manager- a43 is my favorite, download it at: http://www.primitus.us/a43/
    4. A bunch of Sysinternal tools- cause I like them
    5. A GUI based disk partitioning tool – On other hand keep in mind that you can use DISKPART and FORMAT
      image
  4. In addition to copying tools, you should also install the WinPE packages using the following command:
    peimg /install=<pkg> <image directory>
  5. To View the available packages use the following command:
    peimg /list <image directory>
    image 
  6. The ‘Ins’ column shows if the package is installed or not. As you can see none of the packages are installed
    so it’s time to start installing.
    image
  7. Please note that the Windows Recovery Environment component package was dropped. There are workarounds
    to install it, yet since it can be started by more conventional methods I do not cover them.

Part 3 -Customizing WinPE: Adding an alternative shell

In my opinion the most uncomfortable pare of WinPe is the lack of a standard (menu based) shell. I mean we are Microsofties,
we love GUI!

To enable the usage of a more standard shell use the following instructions:

  1. Download an alternate shell for WinPE such as NU2Menu.
  2. Copy it to a directory inside the image.
    [I copied it to \Windows\NUShell]
  3. Customizing the NU2Menu is independent from WinPE and you can find the instruction on the aforementioned web
    site. The configuration is based on an XML file which is very intuitive. I will provide my configuration as an example:
    image image
  4. After you are happy with the layout and configuration you need to configure WinPE to use the alternative shell. This is done by creating a text file withe the following layout:
    [LaunchApp]
    AppPath = %SYSTEMDRIVE%\myshell.exe
    [LaunchApps]
    %SYSTEMDRIVE%\mydir\application1.exe, -option1 -option2
    application2.exe, -option1 -option2
    image

 

Part 3 – Controlling WinPE: Controlling the environment with WPEUTIL

The command that will enable control of the environment is WPEUTIIL. WPEUTIL has several
arguments that control different aspects of the environment. The commands can be integrated
into the startup script or the shell menu. These are the arguments that can be used:

CreatePageFile [/path=<path>] [/size=<size>]

Creates a page file to a specified path and size. You must specify at least one argument, path or size. For example, wpeutil CreatePageFile /path=C:\pagefile.sys.

DisableFirewall

Disables firewall. Does not require any arguments.

EnableFirewall

Enables firewall. Does not require any arguments.

InitializeNetwork

Initializes network components and drivers, and sets the computer name to a randomly-chosen value.

ListKeyboardLayout <LCID>

Lists the supported keyboard layouts (Name and ID) for a given Locale ID (LCID) value. For a list of valid Locale IDs, see List of Locale ID (LCID) Values . For example,

wpeutil ListKeyboardLayouts 0x0409

Or

wpeutil ListKeyboardLayouts 1033

Reboot

Restarts the current Windows PE session.

SetKeyboardLayout <keyboard layout ID>

Sets the keyboard layout in the current Windows PE session. To obtain a list of supported keyboard layouts, run ListKeyboardLayouts <LCID>. To set the keyboard for EN-US, use

wpeutil SetKeyboardLayout 0409:00000409

SetMuiLanguage <language-name>[;<language-name>]

Sets the language. <language-name> uses the international language code format (for example, EN-US for the U.S. English). You can specify multiple languages in priority order by separating them with a semicolon. For example,

wpeutil SetMuiLanguage de-DE;en-US

SetUserLocale <language-name>[;<language-name>]

Sets the user locale. <language-name> uses the international language code format (for example, EN-US for U.S. English). You can specify multiple languages in priority order by separating them with a semicolon. For example,

wpeutil SetUserLocale de-DE;en-US

Shutdown

Shuts down the current Windows PE session.

UpdateBootInfo

Updates information about the method used to boot Windows PE. Information is stored in the registry in the key HKLM\SYSTEM\CurrentControlSet\Control. The results of this operation might change after loading additional driver support.


Part 4 – Customizing WinPE: Cosmetic Changes


  1. If you need to run a command at startup use the ‘startnet.cmd’ batch located at e:\mount\windows\system32.
  2. If you want to change the background look for a file called ‘winpe.bmp’ located in the
    system32 folder of the WinPE environment.

 


Part 5 – Closing the image


To close the image you need to finalize it, unmount it, copy it over the current boot.wim and then create the ISO image.


Use the following instructions:


  1. Unmount the image using the following command:
    imagex /unmount e:\mount /commit
    image
  2. Copy the current image to the boot image:
    copy e:\winpe_x86\winpe.wim e:\winpe_x86\ISO\sources\boot.wim
  3. Create the ISO image:
    oscdimg -n -be:\winpe_x86\etfsboot.com e:\winpe_x86\ISO e:\winpe_x86.iso
  4. Burn the image or create a flash based device.

 


Conclusions


WinPe will provide you with a relatively comfortable environment to troubleshoot a failed installation of Windows.
In essence, WinPE as an operating system that, one that you can customize and configure according to your needs:
you can use it as a deployment tool a recovery platform or anything else you can think about.


In this post, I have tried to demonstrate the relative ease in which you can customize WinPE. The process of customizing
WinPE is not simple, yet with some trial and error you can build your own system and use it in time of need. There are
two alternatives for manually building the WinPE environment (that I can think of) that you might want to consider:


VistaPE – http://www.vistape.net/vistape.html


BartPE – http://www.nu2.nu/pebuilder/


Both of these tools automate the process, nevertheless I prefer the manual method as you get acquainted with environment,
so try it and start experimenting…In a few future posts I will try to put WinPE to work by deploying images using it.


image

Supporting from above and below

First of all I am finally writing this post from my laptop in bed, which is very
comfortable…so now I really feel like a geek…

In the last few weeks I had to look at a probl…er challenge from two different angles. The first
is one that I am used to and comfortable with- I control the network,I have full privileges
and administrative rights on the environment allowing me access to every method I wish.

The second angle I had to analyze, is an unfamiliar one:I had to resolve the same problem
without having administrative privileges,looking from the bottom up.

There is no doubt that when you work from the bottom up, you need to work a lot harder yet
the challenge is greater. You have no access to standard tools such as GPOs so you have to
get creative…

You may think that this is a futile experiment, yet in our day and age most large companies
employ system administrators at their remote branches. These sysadmins have to face this
challenge on a daily basis,and believe me it’s not an easy one…