Help - Search - Members - Calendar
Full Version: Pe 2.0! Full Building Instructions!
The CD Forum > The CD Forum > Windows PE
Pages: 1, 2
Paxamime
I have spent a large amount of time with PE 2.0 for a rather large IT company. In the spirit of sharing here are the scripts that I use to build my PE 2.0's.

First I start by creating a directory called PE in the root so it should look like this "C:\PE"

Download the BDD package from Microsoft's Connect web site. Which you can create a free account to obtain. Once the package is downloaded and installed there is an addition package that needs to be installed. This package is found in C:\Program Files\BDD 2007\WAIK\waikx86.msi Install it and then place the following scripts in C:\PE and follow the process of running the these scripts.

1MakePE Directory.bat
CODE
rd /s/q c:\PE\winpe_x86

c:
cd "c:\program files\windows aik\tools\petools"
call copype.cmd x86 c:\PE\winpe_x86

pause

This will delete and re-create a directory called C:\PE\winpe_x86


2Mount.bat
CODE
cd \
cd c:\Program Files\Windows AIK\Tools\x86

imagex /mountrw c:\PE\winpe_x86\ISO\sources\boot.wim 1 c:\PE\winpe_x86\mount

pause

This mounts the boot.wim file which is the operating system itself and allows you to edit its settings. Anything you put in this mounted directory will be in the X:\ drive when the pe is booted. There is also a folder called ISO this is where you want files just on the CD but not in the mounted image.


3Packages.bat
CODE
cd \
cd c:\Program Files\Windows AIK\Tools\PETools\

peimg /install=WinPE-SRT-Package c:\PE\winpe_x86\mount\Windows

peimg /install=WinPE-HTA-Package c:\PE\winpe_x86\mount\Windows

peimg /install=WinPE-MDAC-Package c:\PE\winpe_x86\mount\Windows

peimg /install=WinPE-Scripting-Package c:\PE\winpe_x86\mount\Windows

peimg /install=WinPE-XML-Package c:\PE\winpe_x86\mount\Windows

::The packages have now been installed and will now be prepared.

pause

This installs the packages into the image which include HTA, MDAC, Scripting, XML and SRT. SRT is the recovery package which includes the System Recover applet.



4PrepareImage.bat
CODE
cd \
cd c:\Program Files\Windows AIK\Tools\PETools\

peimg /prep c:\PE\winpe_x86\mount\Windows

pause

This prepares your packages that were installed. This only needs to be done once unless you change the packages that are installed and does not do anything for any of the other data thats inserted into your mounted image.



5UnMount.bat
CODE
cd c:\Program Files\Windows AIK\Tools\x86\

imagex /unmount c:\PE\winpe_x86\mount /commit

pause

Once you are done changing the boot.wim OS file this will unmount the image.


6MakeISO.bat
CODE
cd \
c:
cd c:\Program Files\Windows AIK\Tools\PETools"

OSCDIMG -bc:\PE\winpe_x86\etfsboot.com -n -o c:\PE\winpe_x86\iso c:\PE\winpe_x86.iso

pause

This makes your .iso image.



Winpeshl.ini
CODE
[LaunchApp]
AppPath = %SYSTEMDRIVE%\NU2\nu2.exe
[LaunchApps]

This one is actually placed in the mounted \Windows\System32 directory and is the shell that is launched once its booted into PE. The nu2 line that is in there is not the shell that I use for my company but it is a good easy to modify shell which is why BartsPE uses it.


I personally dont like the "Hit any key to boot off CD" prompt and if your the same way go into the c:\PE\winpe_x86\ISO\boot\ and delete "BOOTFIX.BIN". Which will bypass the hit any key option and the system memory diagnostic menu.



Thats it! Pretty simple once its layed out. There are varying ways to do this same process and differences of opinions on ways to do each different part but this is the way that works for me. I hope this helps everyone here to get into building PE 2.0's It can be pretty tough if you are not sure where to start.

I am also attaching the scripts so you dont have to copy paste to create the batch files.
UPCTechMatt
We are in a testing phase of BDD at the company we work for. If successful (and it should be), the reload process will be darn near fully automated, which includes unique builds and software that vary from pc to pc (makes ghost and ghost server look seriously obsolete)

Keep us informed up to date on BDD if you do not mind.
Thanks
unknwon
Currently reworking my instructions for enabling Explorer with Winpe 2.0..Seems that Microsoft changed some of the Registry keys on the RC2 build to prevent Explorer from running correctly. Currently it only it loads the desktop and icons ok, but you can`t than launch another explorer to browse the drives.

As soon a i correct these problems i`ll be releasing a new tool to build the pe image.
Nuno Brito
Very elucidative tutorial, it is very easy to read and follow.. laugh.gif

Regarding explorer, wouldn't this be a resource limitation problem?

http://www.boot-land.net/forums/index.php?showtopic=164
http://www.boot-land.net/forums/index.php?showtopic=173

smile.gif
unknwon
The resource limit links you posted are for XP based Pe builds, the one i have done is based on Vista (winpe2.0) had it all working correct until i switched to RC1/RC2 it seems either microsoft added a reource limit to PE again in the new versions or changed some Registry code, i`m current going thought the registry settings looking for changes.
Paxamime
I wish I had an answer for you but I use a custom shell that I cant share. It is an extremely efficient shell that doesn't ever display any signs of resource limitations from what I can tell. The only problem I am encountering at this point is on older machines that are not ACPI compliant. I need to figure out how to do this which so far appears to be in the "errata.inf" file. At this point I have not had enough time to play with it to find out how to disable system checking altogether but if anyone figures it out let me know.

For the errata.inf you have to mount the .wim image and then get it out of Mount\Windows\System32\inf directory.
jtgamble
I've just got a few questions. I work for a private university and we are currently working on creating a PE 2.0 image for use in our IT department - actually its 2 images, one for deployment, and one as a rescue image.

I just got designated lead on the rescue image project, even though I have very little experience with this - I created a couple BartPE images, but thats about it.

First, I'm having troubles getting a shell to actually execute. I created the ini file, placed it in the mounted windows\system32 file, and created a nu2 folder for the ini to point to. But the shell never loads. All I get is the blank vista background. Any ideas as to what may be going wrong, or does the shell just take a long time to load? (I'm booting from a UDF, not a CD.)

Second, is it possible to get IE running yet? I have been able to get iexplore.exe to execute, and a window to pop up, but it closes itself immediately. I've had sucess getting other programs to run - specificly Ad-Aware and other similar programs.

Last, it seems that every program I add to the PE image exponentially increases the time it takes for the image to finish booting. The actual loading of files to the ramdisk takes about the same amount of time no matter what, but once PE actually starts to run it takes longer and longer with each program I add - just wondering if this is to be expected. I don't expect an image with extra programs to load as fast as a fresh, clean image, but should it be taking exponentially longer - we're talking 10 minutes or so with just a couple programs.

Thanks for any help you can give.
unknwon
Yes it possible to get IE working with Winpe 2.0. I currently have IE working correctly on my image, also have Explorer.exe as the shell, just can`t get Explorer to browser the hard drives for some reason.
ckarm
QUOTE (unknwon @ Nov 10 2006, 01:14 PM) *
Yes it possible to get IE working with Winpe 2.0. I currently have IE working correctly on my image, also have Explorer.exe as the shell, just can`t get Explorer to browser the hard drives for some reason.


Any more Instructions on how you did this?
jtgamble
QUOTE (unknwon @ Nov 10 2006, 05:14 AM) *
Yes it possible to get IE working with Winpe 2.0. I currently have IE working correctly on my image, also have Explorer.exe as the shell, just can`t get Explorer to browser the hard drives for some reason.


Any instructions/help would be very much appreciated! Also if you have new instructions for getting explorer.exe that would be great too!
DanPye
QUOTE (jtgamble @ Nov 10 2006, 09:39 PM) *
Any instructions/help would be very much appreciated! Also if you have new instructions for getting explorer.exe that would be great too!


hmmm.. trying to do the basic recovery tools for PE that the AIK states should be available but for some reason, it cannot find the WinPE-SRT-Package to load it into the PE 2.0 build. Any thoughts?

Dan
frodo
QUOTE (DanPye @ Nov 28 2006, 07:47 AM) *
hmmm.. trying to do the basic recovery tools for PE that the AIK states should be available but for some reason, it cannot find the WinPE-SRT-Package to load it into the PE 2.0 build. Any thoughts?

Dan


Yes, they arent there, i was annoyed too....


As for limitations:

there seems to be no resource issues and the 24 hour timebomb is now 72 hours.....
unknwon
Have gone back and rerun my build instructions on RC1, build the PE with out problems, got all of Explorer working, so it`s something that has changed in RC2 that is preventing
Explorer from working correctly..
jtgamble
QUOTE (unknwon @ Nov 28 2006, 05:42 AM) *
Have gone back and rerun my build instructions on RC1, build the PE with out problems, got all of Explorer working, so it`s something that has changed in RC2 that is preventing
Explorer from working correctly..


Has anybody tried with the new, official WAIK that was released a while ago? Anybody know if anything big was changed? I am having problems getting a few things to run, and haven't gotten a shell running yet either - that's just me being new to it, however.

Specificly (if anybody else is from an educational institution) I can't get Cisco Clean Access (CCA) to execute under PE2.0 - running the exe doesn't start a new process for some reason (and yes, I copied the entire directory over to the mount.)
unknwon
QUOTE (jtgamble @ Nov 30 2006, 11:40 PM) *
Has anybody tried with the new, official WAIK that was released a while ago? Anybody know if anything big was changed? I am having problems getting a few things to run, and haven't gotten a shell running yet either - that's just me being new to it, however.

Specificly (if anybody else is from an educational institution) I can't get Cisco Clean Access (CCA) to execute under PE2.0 - running the exe doesn't start a new process for some reason (and yes, I copied the entire directory over to the mount.)



I have seen the same problem with some of my custom apps. in order to get them run i had to open up taskmgr from the cmd, than clicked on New Task, typed in the full path to the exe. it seems for some reason some commands entered at the cmd don`t start, but running them from the GUI (taskmgr or Explorer) will start correctly.
RCollewijn
I have wrote a little batch file to automatic the process to create a new WinPE environment.

Be aware the there is a small change the WAIK package files.

QUOTE
WinPE-SRT-Package is changed into WinPE-WMI-Package


CODE
@Echo Off
Cls

:settings
:: *** Define settings ********************************************************
Set _AIKDir=Program Files\Windows AIK\Tools
Set _AIKDrv=C:
Set _MountDir=Mount
Set _MountDrv=C:
Set _ISODrv=C:
Set _ISODir=DVD
Set _OSType=x86
Set _ExclList=C:\ExclList.ini
Set _Name=My Custom PEVersion
Set _FileName=WinPE

:: *** Settings ***************************************************************
:Copyright
Echo _
Echo ***************************************
Echo *     Build script for WinPE v1.0     *
Echo *   Copyright (c) 2006 R.Collewijn    *
Echo ***************************************


:: *** Create mount folder and mount the image to it **************************
:mount
%_AIKDrv%
Cd "\%_AIKDir%\%_OSType%"
If not Exist %_MountDrv%\%_MountDir% (MkDir %_MountDir%)
If not Exist %_MountDrv%\%_MountDir%\Windows (ImageX /Apply "%_AIKDrv%\%_AIKDir%\PETools\%_OSType%\WinPE.wim" 1 %_MountDrv%\%_MountDir%)


:: *** List the installed packages ********************************************
:packages
Cd "\%_AIKDir%\PETools\"
Rem PEImg /list "%_MountDrv%\%_MountDir%\Windows"

:: *** Add or remove packages *************************************************
:: Rem or unRem the package you want !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
PEImg /Install=WinPE-HTA-Package "%_MountDrv%\%_MountDir%\Windows"
PEImg /Install=WinPE-MDAC-Package "%_MountDrv%\%_MountDir%\Windows"
PEImg /Install=WinPE-Scripting-Package "%_MountDrv%\%_MountDir%\Windows"
PEImg /Install=WinPE-WMI-Package "%_MountDrv%\%_MountDir%\Windows"
PEImg /Install=WinPE-XML-Package "%_MountDrv%\%_MountDir%\Windows"

PEImg /f /prep "%_MountDrv%\%_MountDir%\Windows"


:: *** create temp folders for ISO file ***************************************
:WinPEFolder
If Not Exist %_ISODrv%\%_ISODir%\ (MkDir %_ISO%)
If Not Exist %_ISODrv%\%_ISODir%\Boot\ (MkDir %_ISODir%\Boot)
If Not Exist %_ISODrv%\%_ISODir%\Sources\ (MkDir %_ISODir%\Sources)
If Not Exist %_ISODrv%\%_ISODir%\Tools\ (MkDir %_ISODir%\Tools)


:: *** Create Exclusionlist ***************************************************
:Exclusionlist
Echo [Exclusionlist] > %_ExclList%
Echo Windows\System32\ar-SA >> %_ExclList%
Echo Windows\System32\bg-BG >> %_ExclList%
Echo Windows\System32\cs-CZ >> %_ExclList%
Echo Windows\System32\da-DK >> %_ExclList%
Echo Windows\System32\de-DE >> %_ExclList%
Echo Windows\System32\el-GR >> %_ExclList%
Rem Echo Windows\System32\en-US >> %_ExclList%
Echo Windows\System32\es-ES >> %_ExclList%
Echo Windows\System32\et-EE >> %_ExclList%
Echo Windows\System32\fi-FI >> %_ExclList%
Echo Windows\System32\fr-FR >> %_ExclList%
Echo Windows\System32\he-IL >> %_ExclList%
Echo Windows\System32\hi-IN >> %_ExclList%
Echo Windows\System32\hr-HR >> %_ExclList%
Echo Windows\System32\hu-HU >> %_ExclList%
Echo Windows\System32\it-IT >> %_ExclList%
Echo Windows\System32\ja-JP >> %_ExclList%
Echo Windows\System32\ko-KR >> %_ExclList%
Echo Windows\System32\lt-LT >> %_ExclList%
Echo Windows\System32\lv-LV >> %_ExclList%
Echo Windows\System32\nb-NO >> %_ExclList%
Echo Windows\System32\nl-NL >> %_ExclList%
Echo Windows\System32\pl-PL >> %_ExclList%
Echo Windows\System32\pt-BR >> %_ExclList%
Echo Windows\System32\pt-PT >> %_ExclList%
Echo Windows\System32\ro-RO >> %_ExclList%
Echo Windows\System32\ru-RU >> %_ExclList%
Echo Windows\System32\sk-SK >> %_ExclList%
Echo Windows\System32\sl-SI >> %_ExclList%
Echo Windows\System32\sr-SP-Latn >> %_ExclList%
Echo Windows\System32\sv-SE >> %_ExclList%
Echo Windows\System32\th-TH >> %_ExclList%
Echo Windows\System32\tr-TR >> %_ExclList%
Echo Windows\System32\uk-UA >> %_ExclList%
Echo Windows\System32\zh-CN >> %_ExclList%
Echo Windows\System32\zh-TW >> %_ExclList%


:: *** Adjust Startnet.cmd ****************************************************
:startnet
echo @Echo Off > %_MountDrv%\%_MountDir%\Windows\System32\startnet.cmd
echo wpeinit >> %_MountDrv%\%_MountDir%\Windows\System32\startnet.cmd
echo cmd >> %_MountDrv%\%_MountDir%\Windows\System32\startnet.cmd


:: *** Create new image *******************************************************
:images
Cd "\%_AIKDir%\%_OSType%"
ImageX /Boot /Compress max /Capture %_MountDrv%\%_MountDir% %_ISODrv%\%_ISODir%\Sources\%_FileName%.wim "%_Name%" /verify /Config %_ExclList%


:: *** Prepare ISO Building ***************************************************
:iso
Copy "%_AIKDrv%\%_AIKDir%\PETools\%_OSType%\bootmgr" "%_ISODrv%\%_ISODir%"
XCopy /cherky "%_AIKDrv%\%_AIKDir%\PETools\%_OSType%\Boot" "%_ISODrv%\%_ISODir%\Boot"
XCopy /cherky "%_AIKDrv%\%_AIKDir%\%_OSType%" "%_ISODrv%\%_ISODir%\Tools"


:: *** Build ISO boot file ****************************************************
Cd "\%_AIKDir%\PETools"
OSCDImg.exe -o -b%_ISODrv%\%_ISODir%\Boot\etfsboot.com -n -lMyPE %_ISODrv%\%_ISODir% %_ISODrv%\%_FileName%.iso

:end
ElAguila
Can you tell which files need to be copied over in order to get explorer and IE working?
RCollewijn
@ElAguila,

I don't know if this is possible, keep the following lines (from Bart Lagerweij) in mind!

QUOTE
BartPE vs. Windows PE?

* BartPE is not supported by Microsoft. Windows PE is an official Microsoft product.
* BartPE has a graphical user interface. Windows PE has a command line interface.
* The tools needed to make a BartPE installation are free software. Windows PE is
available only to Microsoft OEM users.
* BartPE allows unlimited custom plugins. Windows PE has a limited range of plugins options.

What is the technical difference between BartPE and Windows PE?

* Target - Microsoft sees Windows PE as an installation platform. Bart sees
Windows PE as the next generation rescue platform.
* Start-menu - Bart's builder gives you a simple, dynamic and powerful start-menu
(Nu2Menu, see screenshots). Microsoft's builder does not give you a start-menu,
it uses a command prompt.
* Build from - Bart's builder can also build from Windows XP Home Edition or from a
preinstalled Windows XP version (without CD).
* Plugins - With PE Builder you can easily add applications, drivers or tools using plugins.
This makes PE Builder extremely powerful. The end user can even combine plugins from
different software vendors into one CD image.
* Network support - PE Builder includes its own network support tools (bartpe/penetcfg) to
start TCP/IP and Microsoft Client. The TCP/IP settings like: dynamic/static ip-address,
subnet-mask, default gateway, dns-servers computer-name, workgroup can be changed
on-the-fly. You can create pre-defined profiles, that you can select. Microsoft Windows PE
only supports DHCP or fixed settings using winbom.ini.
Also there is a plugin (NwDskPe) created by Erwin Veermans that loads the Netware
Client on BartPE (IP/IPX).
* Fileshare - BartPE can start File Sharing support so you can connect to the system through a share.
* VNC - Because of the File Sharing support you can also run UltraVNC.
* Dos support - Bart's builder has a plugin called "dospe".
* License - Microsoft Windows PE is only for Enterprise/OEM customers (see previous),
BartPE is for everybody!
* 64-Bit - Bart's builder does not support Windows 64-bit editions.
unknwon
That write up is comparing the old Winpe 2005(XP) vs bartpe.

You can run Explorer as the GUI for Winpe 2.0 with some tricks.
ckarm
QUOTE (unknwon @ Dec 4 2006, 01:33 PM) *
That write up is comparing the old Winpe 2005(XP) vs bartpe.

You can run Explorer as the GUI for Winpe 2.0 with some tricks.

What tricks
diddy
QUOTE (Paxamime @ Oct 25 2006, 01:13 AM) *
Winpeshl.ini
CODE
[LaunchApp]
AppPath = %SYSTEMDRIVE%\NU2\nu2.exe
[LaunchApps]

This one is actually placed in the mounted \Windows\System32 directory and is the shell that is launched once its booted into PE. The nu2 line that is in there is not the shell that I use for my company but it is a good easy to modify shell which is why BartsPE uses it.


Have tried using Nu2shell as shell however on booting into PE I received the following error message - This program can only be used in BartPE!. I have been able to get nu2menu running using Winpeshl.ini - using the following code:

Winpeshl.ini
CODE
[LaunchApp]
AppPath = %SYSTEMDRIVE%\Programs\nu2menu\nu2menu.exe
[LaunchApps]
AppPath =


I'd always thought that Nu2menu was a program launcher and not a shell but it's working fine so far - I'm not sure what resource limitations it has though. Am also using A43 as file manager - for anyone not familiar with it it's a good alternative to Windows Explorer. A43 actually seems to work better under Windows PE than BartPE, as right clicking a folder (or drive) and selecting properties gives an accurate size reading - I've never been able to get folder sizes working under BartPE.

My boot.wim is only 159MB with these two programs + 7-zip included in it. Although I'd love to get Explorer running under PE I'm not sure I can justify the increased build size - particularly as I don't have much system RAM.
Ben_Mott
@Maxamime
thank you very much for your instructions.
and thank you for the zip file of all the Batch files
saved a lot of typo mistakes .
I also draged and droped all the files from A43 and dropeded it into the ISO folder
and then when it booted ie the cd I D:
to change to CD rom drive and typed A43 and entered
then I got an error message dialog box with OK button when i clicked that A43 file manager loaded in GUI
and i could then negotiate to hard disk and work with some applications.............
the new calculater of microsoft opens up immidiatly when you double click it
Lview loads straight away and can open images etc to edit.
Stinger (little virus catcher) opened up ok after double clicking
I opened fire fox by double clicking it but could not connect to internet but it works off line !!!
I thought PE2 had net work support??
it works with wired connection to router ok
also i tried opera that works well in Vista PE connects to internet straight away.
mspaint.exe ,OSK.exe(virtual keyboard) SOL.exe(game)Selfimage(http://selfimage.excelcia.org/) allwork fine with vista PE
http://selfimage.excelcia.org/

also NET VIEW \\ computername ----- NET USE Z: \\computername\data -----also works ie Vista PE has network capability
straight away. very clever
.......................
any way all i wanted to say thank you for sharing your information
......................
down load details VISTA WAIK(windows automated instruction kit)Free down load site:
down load page
http://www.microsoft.com/downloads/details...;displaylang=en


http://blogs.msdn.com/winre/

http://www.magiciso.com/tutorials/miso-mag...sc-overview.htm


http://www.microsoft.com/downloads/details...;displaylang=en


http://technet.microsoft.com/en-us/windows...905120.aspx#EPB


http://www.911cd.net/forums//index.php?showtopic=18758


http://www.911cd.net/forums//index.php?showtopic=19010

http://vistape.boot-land.net/eng/index.html
BitLocker useful info:
http://apps.wharton.upenn.edu/brainstorm/i...p;entry_id=1175


http://www.microsoft.com/windowsvista/expe...ces/backup.mspx

as i had touble making Burning the ISO earlier with nero express this time I draged and droped it in
our SKEWITeck application (chap who is member of bootable Cd forum)
................................................................................
........
Unzip the contents of bellow and then drag and drop an ISO file onto the ISO2EXE script... it

does the rest." from SKEWITEK
http://www.boxpost.orangehome.co.uk/iso2exe.zip
.................................................
any way it worked straight away 1st it compressed the ISO to 166MB as an executable then when I double clicked the executable it copied the ISO to CD-R as a bootable Cd without asking a single question ohmy.gif
......................................................
I find PE 2.0 very fast once it gets to the command prompt it is speedy gonzalez if Vista is as fast as that
it is great improvement.
or is it because it is working from RAM drive ????
........................................
useful information
http://blogs.msdn.com/winre/
.........................................

Regards Ben
smile.gif
Ben_Mott
@ Maxamime or other PE2.0 vista knowlegables/experts
you are very good in explainng ;
is it possible to give instruction on how:

I want to say copy an .wim image of my IDE hard disk (with all apps and data )to another external /or internal HDD using your PE2. boot disk or/installation DVD or within windows Recovery APP Vista.

2 . then I want to recover that .wim image of the hard disk back to the same hard drive where it came from ????

one can do this with ghost .exe
can one do this with imageX or just from installation DVD ??
thanks in advance.
................................................................................
......................
edited 19Dec 2006
Requirements
To complete this scenario, you need the following:
 Window Vista product DVD.
 Windows AIK Download.
 A technician computer.
 A master computer.
 Network connectivity to simulate deployment.
 Floppy disk or Universal Flash Device (UFD), such as a USB memory key.
 One blank CD-R/RW disc.

The technician computer is the computer in your lab on which you install the Windows AIK. The technician computer can be any computer running Windows XP, Windows Server 2003, or Windows Vista. This computer requires a DVD-ROM drive and CD-R/RW-capable drive, or a combo drive that supports both.
A master computer, sometimes called a reference computer, is a fully assembled computer on which you install a customized installation using the Windows product DVD and your custom answer file. Once installed, you capture and store an image of the installation on a network share. There are no software requirements for this computer. Both technician and master computers require a network card and working network environment.
Note For the purposes of this example, the master computer will serve as your master and destination computer. The master/destination computer represents the computer you are about to deploy. After you build a master installation, you will capture and store an image of that installation on a network share. You will then reformat the hard drive, returning it to a blank state. The computer now becomes your destination computer. You will then deploy the image from the network share back onto the same computer. This process simulates an image-based deployment.
Build a Lab Environment
A lab environment is where you define and build your installation. A lab environment consists of two computers: a technician computer and a master computer.
To build a technician computer
 On your designated technician computer, download and install the Windows AIK. The Setup program will automatically start. Follow the online instructions.
To build a master computer
 Assemble the new computer. The computer must have a DVD-ROM drive, network card, and a floppy disk drive or USB support. There are no preinstalled software requirements.
Build an Answer File
The first step in creating a custom installation is to build an answer file. An answer file stores the custom settings that are applied during Windows Setup. The primary method for creating an answer file is to use Windows SIM.
The basic process includes:
1. Creating a new answer file.
2. Adding a component or package to an answer file.
3. Changing the value of a setting in an answer file.
4. Validating an answer file.
5. Saving an answer file to floppy disk or UFD.
After you have successfully created a basic answer file, you can build a master installation.
To create a new answer file
In this step, you will build a catalog and then a new blank answer file. A catalog (.clg) is a binary file that contains the state of all of the settings and packages in a Windows image.
1. From your technician computer, insert the Windows Vista product DVD into the local DVD-ROM drive.
2. From your desktop, navigate to the \sources directory on your DVD-ROM drive. Copy install.wim from the product DVD to a location on your technician computer.
3. Open Windows SIM. From your desktop, click Start, point to Programs, point to Microsoft Windows AIK, and then click Image Manager.
4. On the File menu, click Select Windows Image.
5. In the Select a Windows Image dialog box, navigate to the location where you saved install.wim, and then click Open.
6. In the Select an Image dialog box, select the appropriate version of Windows Vista, and then click OK.
7. On the File menu, click New Answer File.
Note A warning will appear that a catalog does not exist. Click OK to create a catalog. You must create a catalog for each version of Microsoft Windows Vista.
To add and configure Windows settings
In this step, you will define basic disk configuration and Windows Welcome options.
1. In Windows SIM, in the Windows Image pane, expand the Component node to display available settings.
2. From the expanded list of components, add the following components to your answer file by right-clicking the component and then selecting the appropriate configuration pass. This action will add the component to your answer file in the specified configuration pass. A configuration pass is a phase of Windows installation. Different parts of the Windows Vista operating system are installed in different configuration passes. You can specify settings to be applied in one or more configuration passes.

Component Configuration Pass
Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition 1 windowsPE
Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition 1 windowsPE
Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo 1 windowsPE
Microsoft-Windows-Setup\UserData 1 windowsPE
Microsoft-Windows-Shell-Setup\OOBE 7 oobeSystem
Microsoft-Windows-Shell-Setup\AutoLogon 7 oobeSystem
Microsoft-Windows-International-Core-WinPE 1 windowsPE

Note Expand the component list until you see the lowest setting listed above, and then add that setting to your answer file. This shortcut will add the setting and all parent settings to your answer file in one step.
3. All the settings you added should appear in the Answer File window pane. Select and configure each setting as specified below.
Component Value
Microsoft-Windows-Setup\DiskConfiguration WillShowUI = OnError
Microsoft-Windows-Setup\DiskConfiguration\Disk DiskID = 0
WillWipeDisk = true
Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition Extend = false
Order = 1
Size = 20000 (Note: This example creates a 20-GB partition.)
Type = Primary
Microsoft-Windows-Setup \DiskConfiguration\Disk\ModifyPartitions\ModifyPartition Active = true
Extend = false
Format = NTFS
Label = OS_Install
Letter = C
Order = 1
PartitionID = 1
Microsoft-Windows-Setup\ImageInstall\OSImage\ WillShowUI = OnError
Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo DiskID = 0
PartitionID = 1
Microsoft-Windows-Setup\UserData AcceptEula = true


Component Value
Microsoft-Windows-Setup\UserData\ProductKey Key = <product key>
WillShowUI = OnError
Microsoft-Windows-Shell-Setup\OOBE HideEULAPage = true
ProtectYourPC = 3
SkipMachineOOBE = true
SkipUserOOBE = true
Microsoft-Windows-International-Core-WinPE InputLocale = <Input Locale>
SystemLocale = <System Locale>
UILanguage = <UI Language>
UserLocale = <User Locale>
Microsoft-Windows-International-Core-WinPE\SetupUILanguage UILanguage = <UI Language>
Microsoft-Windows-Shell-Setup\AutoLogon Enabled = true
LogonCount = 5
Username = Administrator
Microsoft-Windows-Shell-Setup\AutoLogon\Password <strongpassword>

The settings above outline a basic unattended installation; no user input is required during Windows Setup.
To validate and save settings
In this step, you will validate the settings in your answer file and then save them to a file.
1. In Windows SIM, click Tools, and then click Validate Answer File. The setting values in the answer file are compared with the available settings in the Windows image.
2. If the answer file validates successfully, a “success” message appears in the Messages pane; otherwise, error messages appear in the same location.
3. If an error occurs, double-click the error in the Messages pane to navigate to the incorrect setting. Change the setting to fix the error, and then revalidate.
4. On the File menu, click Save Answer File. Save the answer file as Autounattend.xml.
5. Copy Autounattend.xml to the root of a floppy disk or UFD.
You now have a basic answer file that automates Windows Setup. For more information on building answer files, see “Phase 3: Preinstallation Customization”, in Waik.chm.
Build a Master Installation
A master computer is a customized installation of Windows that you plan to duplicate onto one or more destination computers. By using the Windows product DVD and an answer file, you can create a master installation.
The basic process includes:
1. Assembling new hardware.
2. Installing Windows from a Windows product DVD and answer file.
3. Verifying installation and customizations.
4. Shutting down the computer when the installation is complete.
To install Windows from the Windows product DVD
1. Turn on the new computer.
2. Insert removable media containing the answer file (Autounattend.xml) and Windows Vista product DVD into the new computer.
3. Restart the computer (CTRL+ALT+DEL).
This example assumes the hard drive is blank. Windows Vista Setup (Setup.exe) will begin automatically. By default, Windows Setup will search all removable media for an answer file called Autounattend.xml.
4. After Setup finishes, validate that all customizations were applied.
5. Reseal (generalize) and shut down the computer. From a command prompt, type: c:\windows\system32\sysprep\sysprep.exe /oobe /generalize /shutdown.
Sysprep will prepare the image for capture by cleaning up various user and machine settings and log files. The master installation is complete and ready to be imaged.
Create an Image
After you build a master installation, you can deliver the new computer to a user, and then repeat the previous steps for each new computer. However, it is more efficient to capture an image of the master installation and then deploy that image onto other new computers. The primary tools for completing this process are ImageX and Windows PE. ImageX is a command-line tool that enables you to capture, modify, and apply file-based disk images. Windows PE provides an environment from which you can capture and deploy an image.
In this example, ImageX is used in a Windows PE environment. For more information on these tools, see “Deployment Tools Technical Reference” in Waik.chm.
The basic process includes:
1. Creating a bootable Windows PE media.
2. Booting the master installation by using Windows PE media.
3. Capturing the installation image by using ImageX.
4. Storing the image on a network share.
To create bootable Windows PE media
In this step, you will create a bootable Windows PE RAM CD. You will use this CD to capture an image of your master computer and later deploy that image onto your destination computer.
1. From your technician computer, run the copype.cmd script to create a local Windows PE build directory. For example, from a command prompt, type:
cd Program Files\Windows AIK\Tools\PETools\
copype.cmd <arch> <destination>
Where <arch> can be x86, amd64, or ia64 and <destination> is a path to local directory. For example,
copype.cmd x86 c:\winpe_x86
2. Copy additional tools like ImageX into your Windows PE build directory. For example,
copy “c:\program files\Windows AIK\Tools\x86\imagex.exe” c:\winpe_x86\iso\
3. Optionally, create a configuration file called wimscript.ini using any text editor, for example Notepad. The configuration file will instruct ImageX to exclude certain files during the capture operation. For example,
[ExclusionList]
ntfs.log
hiberfil.sys
pagefile.sys
"System Volume Information"
RECYCLER
Windows\CSC

[CompressionExclusionList]
*.mp3
*.zip
*.cab
\WINDOWS\inf\*.pnf
4. Save the configuration file to the same location as ImageX as specified in the previous step. For example:
c:\winpe_x86\iso\
ImageX will automatically detect wimscript.ini if located in the same location.
5. Create an image (.iso) file by using the Oscdimg tool. For example, from a command prompt, type:
cd program files\Windows AIK\Tools\PETools\
oscdimg -n –bc:\winpe_x86\etfsboot.com c:\winpe_x86\ISO c:\winpe_x86\winpe_x86.iso
6. Burn the image (winpe_x86.iso) to a CD-ROM.
Windows AIK does not include CD-ROM burning software. Use any third-party software to burn the image to a CD-ROM.
You now have a bootable Windows PE RAM CD with ImageX. For more information on customizing Windows PE, see the Windows Preinstallation Environment (Windows PE) User’s Guide (Winpe.chm).
To capture and store the installation onto a network share
In this step, you will capture image of your master computer using Windows PE and ImageX. You will then store that image onto a network share.
1. On your master computer, insert your Windows PE media and restart the computer.
Windows PE will start and launch a command-prompt window.
Note When you boot your master computer, you must override the boot order to boot from the CD/DVD-ROM drive. During initial boot, select the appropriate function key to override the boot order.
2. Capture an image of the master installation by using ImageX located on your Windows PE media. For example, from the command-prompt window, type:
d:\tools\imagex.exe /compress fast /capture c: c:\myimage.wim "my Vista Install" /verify
3. Copy the image to a network location. Windows PE provides network support. For example, from the command-prompt window, type:
net use y: \\network_share\images
copy c:\myimage.wim y:
If necessary, provide network credentials for appropriate network access.
Deploy an Image
After you have an image of your master installation, you can deploy the image onto new hardware by using ImageX and Windows PE.
The basic process includes:
1. Assembling new hardware.
2. Booting new hardware using Windows PE media.
3. Formatting the hard drive.
4. Connecting to your network share and copying the custom image down to your local hard drive.
5. Applying the image by using ImageX.
To deploy a custom image from a network share
In this step, you will use DiskPart to format the hard drive, and then copy an image down from the network share. For this example, use your master computer as your destination computer.
1. On your destination computer, insert your Windows PE media and restart the computer.
Windows PE will start and launch a command-prompt window.
Note Because this was your master computer, the hard drive contains an active partition. You must override the boot order to boot from the CD/DVD-ROM drive. During initial boot, select the appropriate function key to override the boot order. If this is a newly assembled computer, the hard drive would be unformatted and this step could be skipped.
2. Format the hard drive to reflect the required disk configuration requirements by using DiskPart. For example, from a command prompt, type:
diskpart
select disk 0
clean
create partition primary size=20000
select partition 1
active
format
exit
Note You can script this information by saving this information to a text file and storing it in the same location as your image. To run the script from a Windows PE command prompt, type diskpart /s scriptname.txt
3. Copy the image from the network share to your local hard drive. For example, from the command prompt, type:
net use y: \\network_share\images
copy y:\myimage.wim c:
If necessary, provide network credentials for appropriate access.
4. Apply the image to the hard drive using ImageX located on your Windows PE media. For example, from the command-prompt window, type:
d:\tools\imagex.exe /apply c:\myimage.wim 1 c:
Your custom image is now deployed onto your destination computer. The computer is ready for customer delivery. You can repeat the previous steps for each additional machine you want to ship.
Summary
You have now completed a basic end-to-end deployment scenario using an image-based deployment method. You have successfully created a lab environment, your first answer file, a bootable Windows PE CD, and your first custom Windows image. You have a basic understanding of how to use Windows SIM and the ImageX and Windows PE technologies.
The next step is to make additional customizations to your answer file and expand your knowledge of the deployment tools. You can automate parts of the deployment process by scripting the Windows PE sections in this example. For a comprehensive description of the tools and other deployment methods, see the Windows Automated Installation Kit User’s Guide (Waik.chm
................................................................................
...........................

Regards Ben
smile.gif
Morris56
QUOTE (RCollewijn @ Dec 4 2006, 03:13 AM) *
@ElAguila,

I don't know if this is possible, keep the following lines (from Bart Lagerweij) in mind!



PE was once difficult for end users to (legally) obtain and use.
With Vista's release, PE version 2.0 is available for all licensed Windows users.
Microsoft currently supports PE as a diagnostic and recovery tool.
drob
I have been reading throw Paxamime scripts (first post), what i want is to create a simple PE CD which will autostart A43. what script/lines do i need to add, at what point of the scripts, and where do the A43 directory need to go, a step by step, relevant to Paxamime scripts would be appreciated.
Paxamime
QUOTE (drob @ Sep 5 2007, 05:11 PM) *
I have been reading throw Paxamime scripts (first post), what i want is to create a simple PE CD which will autostart A43. what script/lines do i need to add, at what point of the scripts, and where do the A43 directory need to go, a step by step, relevant to Paxamime scripts would be appreciated.



[LaunchApp]
AppPath = %SYSTEMDRIVE%\a43\a43.exe
[LaunchApps]


Or at least something like that. You can put it anywhere so long as you tell it where the executable is.
Ben_Mott
how to Boot Auto to A43 GUI file manager

Directory of C:\PE

17/10/2007 20:40 <DIR> .
17/10/2007 20:40 <DIR> ..
11/12/2006 20:47 124 1MakePEDirectory.bat
11/12/2006 20:51 136 2Mount.bat
11/12/2006 20:53 466 3Packages.bat
11/12/2006 20:57 106 4Prepareimage.bat
11/12/2006 20:59 100 5UnMount.bat
11/12/2006 21:03 153 6MakeISO.bat



11/12/2006 21:23 <DIR> PEbatchFiles

17/10/2007 07:48 <DIR> winpe_x86
17/10/2007 17:57 194,545,664 winpe_x86.iso
11 File(s) 194,553,492 bytes
4 Dir(s) 1,949,704,192 bytes free
when you mount VISTA PE with:
2Mount.bat
it mounts it with read/write
so in windows explorer you can copy and paste
programs like a43 (the excellent file manager)
or selfimage1.2(the latest version)
to the(mounted folder) C:\PE\winpe_x86\mount\windows\system32
you can also open a file called startNet.CMD in system 32 in notepad(right click choose edit
it has one line
WPEinit
add another line
a43
and save it
----
then skip 3and 4 go to
5unmount.bat
then
6makeiso.bat
then make cd from iso with imgBurn or nero
now when you boot it auto starts the A43 boot manager
to get your prompt back either close A43 application
then in command window it asks
end Batch ?? yes"Y" or no"N" ??
when type y and enter you get your prompt back.
or leave A43 file manager open and click the tool bar menu icon for command prompt in A43
(little black icon easily missed)



Regards Ben
biggrin.gif
Ben_Mott
how to boot Auto into NU2menu.exe (barts PE menu)

after i mounted the Vista into mount directory as described in above post
using 2mount.bat
I dropped (copied and pasted so many thing that I could not remember
so I thought a menu was the right thing so I copied and pasted all contents of NU2Menu
from bart pe plugin
to system32 on vista which was mounted
then went to mount directory and opend NU2MNU.XML in a
text editor and changed the accessory part
<MENU ID="Accessories">
<MITEM TYPE="ITEM" DISABLED="@Not(@FileExists(@GetWinDir()\system32\notepad.exe))" CMD="RUN" FUNC="@GetWinDir()\system32\notepad.exe">Notepad</MITEM>
<MITEM TYPE="ITEM" DISABLED="@Not(@FileExists(@GetWinDir()\system32\calc.exe))" CMD="RUN" FUNC="@GetWinDir()\system32\calc.exe">Calculator</MITEM>
<MITEM TYPE="ITEM" DISABLED="@Not(@FileExists(@GetWinDir()\system32\mspaint.exe))" CMD="RUN" FUNC="@GetWinDir()\system32\mspaint.exe">Paint</MITEM>
<MITEM TYPE="ITEM" DISABLED="@Not(@FileExists(@GetWinDir()\system32\selfimage.exe))" CMD="RUN" FUNC="@GetWinDir()\system32\selfimage.exe">selfimage BackUp Restore </MITEM>
<MITEM TYPE="ITEM" DISABLED="@Not(@FileExists(@GetWinDir()\system32\a43.exe))" CMD="RUN" FUNC="@GetWinDir()\system32\a43.exe">A43 File Manager</MITEM>
<MITEM TYPE="ITEM" DISABLED="@Not(@FileExists(@GetWinDir()\system32\sudoku.exe))" CMD="RUN" FUNC="@GetWinDir()\system32\sudoku.exe">Sudoku</MITEM>
<MITEM TYPE="ITEM" DISABLED="@Not(@FileExists(@GetWinDir()\system32\diskpart.exe))" CMD="RUN" FUNC="@GetWinDir()\system32\diskpart.exe">Disk partitioning </MITEM>
<MITEM TYPE="ITEM" DISABLED="@Not(@FileExists(@GetWinDir()\system32\opera.exe))" CMD="RUN" FUNC="@GetWinDir()\system32\opera.exe">Opera Web Browser </MITEM>
<MITEM TYPE="ITEM" DISABLED="@Not(@FileExists(@GetWinDir()\system32\lview.exe))" CMD="RUN" FUNC="@GetWinDir()\system32\lview.exe">Lview </MITEM>
<MITEM TYPE="ITEM" DISABLED="@Not(@FileExists(@GetWinDir()\system32\scdwriter.exe))" CMD="RUN" FUNC="@GetWinDir()\system32\scdwriter.exe">Small Cd writer </MITEM>
</MENU>

because i noticed that paint and notpad were in system 32 and it was workin
then I opend that STARTNET.CMD
in notepad and
cleared A43
and replaced it with
NU2Menu.exe
and saved it
the again i used 5unmount.bat
to un mount the image
then i used 6makeiso.bat
to make iso
then i used IMGBURN to make a CD
it works ok except it is all loaded in RAM so you need plenty of it
but we all know Vista needs at least 1000Mb or ram to work properly

all work of excent small Cd which needs more ram.
mine is only nearly 400MB
not enough
regards Ben
biggrin.gif
Ben_Mott
How to add MEMTEST.EXE to WAIK made vistaPE2

See http://www.911cd.net/forums//index.php?sho...mp;#entry137938

regards Ben
biggrin.gif
Ben_Mott
Vista Bitlocker repair Tool (decrypt and save again)
How to use the BitLocker Repair Tool to help recover data from an encrypted volume in Windows Vista
below is a useful tool to have on your Vista PE if you can get it it is called:
Bitlocker repair tool

http://support.microsoft.com/kb/928201

you need to fill in lots of forms at MS frankly I got bored so i left it.

regards Ben
biggrin.gif
Ben_Mott
Hello again.
does any body knows how to start the Vista System restore on the command line of PE2(vista WAIK version)
for instance in XP it is rstrui.exe what is it in Vista ???
it is auto displayed in windows installation disk .(when booted up and tap the space bar ->advance)
so the prog must be some where on the system32 folder.
I found memtest.exe there earler and moved it to the right place (see posts above)
but i can not get my head around this problem.
your help will be appreciated.
Thanks
Ben
hmm.gif
jdflory
Paximime,

I just wanted to say thanks for your batch files. This really simplied the process and cleared up alot of confusion I was having on the command line structure. This enabled me to fully customize (add drivers, ghost, create drive mappings and add applications) and to integrate the finalized image to WDS. I just left in in WIM format and added to WDS. It is working like a charm so thanks again.

Jason
Paxamime
QUOTE (jdflory @ Nov 28 2007, 03:05 PM) *
Paximime,

I just wanted to say thanks for your batch files. This really simplied the process and cleared up alot of confusion I was having on the command line structure. This enabled me to fully customize (add drivers, ghost, create drive mappings and add applications) and to integrate the finalized image to WDS. I just left in in WIM format and added to WDS. It is working like a charm so thanks again.

Jason

Its no problem. Just glad I could help everyone out.


@Ben_Mott

The best thing to do would be to rip the files you need from a Vista disk.

CODE
cd \
cd c:\Program Files\Windows AIK\Tools\x86

imagex /compress fast /check /boot /scroll /export E:\sources\boot.wim 2 C:\Pe\WinRE.wim

pause


Change what you need to for your system (E:\ is the DVD-ROM). Then the files that actually pertain to the "Windows Recovery Environment" (WinRE) are contained in the #2 part of the Wim (refer to command above for the "2" after the boot.wim). The files after they are mounted on my system are here..... C:\PE\winpe_x86\mount\sources\recovery and the file you need to execute is called RecEnv.exe

The files you need (I delete everything else)

StartRep.exe
RecEnv.exe
PssWiz.exe
en-US (folder)


I hope this helps some more people out.
Ben_Mott
@paximime,
Thank you for the information ,i will try it at weekend.
Yes I still use your very useful batch files.

and thank you again for sharing your knowledge with us
Regards Ben
biggrin.gif
Ben_Mott
sorry it has taken such a long time to come back
it was difficult getting hold of a Vista DVD

any way some of NEO smart Guys(easyBCD.exe Guys) have put what i was inquiring about on their web site for down load
it is basically a windows PE riped off the DVD
But it has some sort of Bug on it
basically Knakered my system

if you got the DVD it has a boot.wim 113MB
if you exchange that with boot.wim(153MB) in WAIK PE builder
and also change winpe.wim again with same boot.wim file but this time change name to winpe.wim
and then drop any thing you want on Cd to ISO folder like A43 file manager or Opera
then use 6makeiso.bat to makewinPE.iso
do not mount and drop them in system32 like before as it is different and they will not open (do not know why??)
I have tested it using this method and it works
way I mentioned you can add A43 to root of Cd which is very handy.

thanks again for all your BAT files it is very handy
regards Ben
biggrin.gif biggrin.gif
Ben_Mott
how to make a Custom Vista DVD)
Reference WAIK PE maker:
change 6makeiso.bat slightly
the -m parameter OSCDIMG removes limitation of Cd size
so it can make a DVD image size
put Boot.wim and install.wim in resources directory
and winpe.wim in waik has been changed by same Boot.wim(from DVD) and renamed WINPE.wim

because install.wim is from OEm PC and is for Primum edition
it will not accept any other key except for primium.

A43.exe file manager is in ISo folder plus all tools in tools directoryin Iso folder.

they will be seen on root of DVD .

if you want to just go back to cd size remove (cut) the install.wim from
the resources directory

Do not mount and add things to system 32 as it will not work also
do not drop A43.exe to resorces directory again it will not work .

Regards Ben
Ben_Mott
QUOTE
"Windows Recovery Environment" (WinRE) are contained in the #2 part of the Wim (refer to command above for the "2" after the boot.wim).


Hello Paxamime,
you seem to know a bit about Vista may be you can help
as you know yourself the INSTALL.WIM image contains all the version of Windows Vista
say if one mounted install.wim 1
install.wim 2
install.wim 3
does it mount different version of Vista ?????????????? ie 1 for basic 2 for premium 3 for ultimate etc
in the same way we managed to extract WINRE from the BOOT.WIM image ?????

I thought i ask you first before doing a research into it at the week end.

Regards Ben
hmm.gif
Paxamime
Actually yes it is different for each number. From a Vista disks "Sources" directory..

For boot.wim

1: WinPE
2: Setup


For Install.wim

1: Business
2: Home Basic
3: Home Premium
4: Ultimate
5: Basic N
6: Business N
7: Starter Edition


And I am happy to help out....
Ben_Mott
@Paxamime,

Thanks Very much for the information and your time .

Regards Ben
Ben_Mott
Hello again,

the numbers you quoted above for install.wim
is probably for the original retail windows Vista
My install.wim is from an OEM computer called Medion (some sort of German computer/laptop)
so it looks like it is an image of what they installed on their Lab computer then
imaged it .
I mounted it and had another look and looked all .XML files but could not figure it out.
I just do not understand why the size is still 2.4 GB ???



Regards Ben
biggrin.gif
Ben_Mott
coming back to that windows restore
in windows pe you get 2 windows
X:\windows
and
C:\windows
so in the command line one needs to type:
rstrui.exe /OFFLINE:C:\windows

this tells windows which windows OS you want to restore.
and when the Dialog box pops up you can proceed.

if you got duel boot you will not have any restore point as windows vista keeps deleting it
due to access violation on every boot up

regards Ben
Ben
==============================================================
useful info:
here is a vista PE specially Hacked to repair Advent,EIsystem and Philips-Freevent vista OS
the link to ISO

the fix is in TGM directory
and it loads from winpeshl.ini in x:\windows\system32
you need to mount it using 2mount.bat
and put a43.exe in there and change the file to load a43.exe file manager instead of fixboot.exe
then you can work with it
the boot.wim is nearly 200mb but when you build the ISo using 6buildiso.bat
it increases to 1.2GB so you need to use -m to change it to DVD instead of CD read previous posts

the TGM directory contains these files:

-----------------------------------
Directory of TGM
=====================


diskpart_CheckLetters2.txt
diskpart_SetRtoActive.txt
FixBoot.exe

msvbvm60.dll
new.cmd
scrrun.dll
SetAutoFailover.cmd
-------------------------------
the fixboot.exe is simply a visual5/6 one button command dialog box to run
the new.cmd batch file in GUI mode
the new.cmd contains this:
----------------------------
X:\Windows\System32\diskpart.exe /s X:\TGM\diskpart_CheckLetters2.txt


call X:\TGM\setautofailover.cmd /target r: /mainos {default} /disk 0 /partition 1 /nohide


BCDEDIT -set {bootmgr} device partition=R:
BCDEDIT -set {default} device partition=R:
BCDEDIT -set {default} osdevice partition=R:
REM BCDEDIT -set {default} path \windows\system32\Boot\winload.exe
REM BCDEDIT -set {bootmgr} path \windows\system32\Boot\winload.exe

xcopy v:\Bootmgr R:\ /chy
xcopy v:\Boot R:\Boot\ /chey


X:\Windows\System32\diskpart.exe /s X:\TGM\diskpart_SetRtoActive.txt


BCDEDIT -set {bootmgr} device partition=R:
BCDEDIT -set {default} device partition=R:
BCDEDIT -set {default} osdevice partition=R:
-----------------------------------------------
the /s in diskpart.exe means run script file following /s
and /chey in xcopy means
c- copy even with error
h-copy hidden files
e-copy all sub directory and empty files
y- do not prompt user
---------------------------------------
so the other files it relies on are diskpart_CheckLetters2.txt
......................
select disk 0
select partition 1
assign letter=R
select partition 2
assign letter=V
active

.........................
diskpart_SetRtoActive.txt
,,,,,,,,,,,,,,,,,,,,,,,,,,

select disk 0
select partition 1
active
,,,,,,,,,,,,,,,,,,,,,,,,,
SetAutoFailover.cmd
======================================
CODE
@echo off

REM
REM Copyright © Microsoft Corporation
REM
REM Description:
REM
REM Sample script to configure the boot configuration data
REM of Windows Vista and WinRE to set auto failover.
REM
REM

:GLOABAL_INIT

setlocal & pushd & set RET=

set SCRIPTNAME=%~n0
set SCRIPTPATH=%~f0
if "%DEBUG%"=="1" (set TRACE=echo) else (set TRACE=REM)

if /i {%1} == {-?} (call :SHOW_USAGE & goto :EOF)
if /i {%1} == {/?} (call :SHOW_USAGE & goto :EOF)

call :MAIN %*

popd & endlocal & set RET=%RET%& set PATH=%PATH%

goto :EOF

REM
REM Main procedure
REM

:MAIN

set BCDEDIT=bcdedit.exe
set DISKPART=diskpart.exe
set DISK=0
set PARTITION=1
set MAINOS={default}

REM
REM Parse command line
REM

call :PARSE %*

REM
REM Check whether bcdedit exists or not
REM

%BCDEDIT% /?>nul

if %errorlevel%==9009 (
call :SHOW_USAGE
goto :EOF
)

if {%TARGET%} == {} (
call :SHOW_USAGE
goto :EOF
)

REM
REM Extract the drive name and root directory from the target
REM
for /f "delims=: tokens=1*" %%I in ("%TARGET%") do (
set DRIVE=%%I:
set WINRE_ROOT_DIR=%%J
)

if {%DRIVE%} == {:} (
call :SHOW_USAGE
goto :EOF
)

if not {%BCDSTORE%} == {} (
set BCDEDIT=%BCDEDIT% -store %BCDSTORE%
)

if {%ISWIM%}=={} (

REM
REM WinRE root directory should be NULL.
REM
if not {%WINRE_ROOT_DIR%}=={} (
echo ERROR: WinRE cannot be installed under a sub directory.
goto :EOF
)

call :CREATE_DIR_BCD_ENTRY

) else (

call :CREATE_WIM_BCD_ENTRY

)

REM
REM Mark this installation as the recovery OS. This recovery OS identifier
REM will be used by other components to enable/disable auto recovery.
REM
%BCDEDIT% -set %WINPE_GUID% custom:46000010 yes

REM
REM Set the recovery sequence
REM

%BCDEDIT% -set %MAINOS% recoverysequence %WINPE_GUID%
%BCDEDIT% -set %MAINOS% recoveryenabled yes

REM
REM Hide partition
REM

if not {%NOHIDE%}=={} (
goto :EOF
)

set TEMP_FILENAME=%SCRIPTNAME%_Temp_DiskPart.txt

echo sel disk %DISK% > %TEMP_FILENAME%
echo sel partition %PARTITION% >> %TEMP_FILENAME%

REM
REM Remove the drive letter for the partition before hiding it.
REM The system will not allow us to remove the drive letter after hiding it.
REM
echo remove >> %TEMP_FILENAME%

if {%GPT%}=={} (
echo set id=27 >> %TEMP_FILENAME%
) else (

REM
REM Set GPT_ATTRIBUTE_PLATFORM_REQUIRED attribute
REM
echo gpt attributes=0x0000000000000001 >> %TEMP_FILENAME%
)

%DISKPART% /s %TEMP_FILENAME%

del %TEMP_FILENAME%

REM
REM Done.
REM

goto :EOF

REM
REM Procedure to parse command line.
REM

:PARSE

if {%1} == {} goto PARSE_DONE

if /i {%1} == {-target} set TARGET=%2&& shift && goto PARSE_NEXT
if /i {%1} == {/target} set TARGET=%2&& shift && goto PARSE_NEXT

if /i {%1} == {-wim} set ISWIM=1&& goto PARSE_NEXT
if /i {%1} == {/wim} set ISWIM=1&& goto PARSE_NEXT

if /i {%1} == {-gpt} set GPT=1&& goto PARSE_NEXT
if /i {%1} == {/gpt} set GPT=1&& goto PARSE_NEXT

if /i {%1} == {-diskpart} set DISKPART=%2&& shift && goto PARSE_NEXT
if /i {%1} == {/diskpart} set DISKPART=%2&& shift && goto PARSE_NEXT

if /i {%1} == {-bcdedit} set BCDEDIT=%2&& goto PARSE_NEXT
if /i {%1} == {/bcdedit} set BCDEDIT=%2&& goto PARSE_NEXT

if /i {%1} == {-bcdstore} set BCDSTORE=%2&& goto PARSE_NEXT
if /i {%1} == {/bcdstore} set BCDSTORE=%2&& goto PARSE_NEXT

if /i {%1} == {-mainos} set MAINOS=%2&& goto PARSE_NEXT
if /i {%1} == {/mainos} set MAINOS=%2&& goto PARSE_NEXT

if /i {%1} == {-partition} set PARTITION=%2&& goto PARSE_NEXT
if /i {%1} == {/partition} set PARTITION=%2&& goto PARSE_NEXT

if /i {%1} == {-disk} set DISK=%2&& goto PARSE_NEXT
if /i {%1} == {/disk} set DISK=%2&& goto PARSE_NEXT

if /i {%1} == {-nohide} set NOHIDE=1&& goto PARSE_NEXT
if /i {%1} == {/nohide} set NOHIDE=1&& goto PARSE_NEXT

:PARSE_NEXT

shift
goto PARSE

:PARSE_DONE

goto :EOF

REM
REM Procedure to create a BCD entry for WinRE installed as a flat directory
REM

:CREATE_DIR_BCD_ENTRY

REM
REM Customize WinRE
REM

echo [LaunchApp] > %TARGET%\windows\system32\winpeshl.ini
echo AppPath=x:%WINRE_ROOT_DIR%\sources\recovery\recenv.exe >> %TARGET%\windows\system32

\winpeshl.ini

REM
REM Set BCD
REM {572bcd55-ffa7-11d9-aae0-0007e994107d}, GUID for the WinPE boot entry
REM

set WINPE_GUID={572bcd55-ffa7-11d9-aae0-0007e994107d}

REM
REM Create WinRE boot entry
REM

%BCDEDIT% -create %WINPE_GUID% -d "Windows Recovery Environment" -application OSLOADER
%BCDEDIT% -set %WINPE_GUID% device partition=%DRIVE%
%BCDEDIT% -set %WINPE_GUID% path %WINRE_ROOT_DIR%\windows\system32\boot\winload.exe
%BCDEDIT% -set %WINPE_GUID% osdevice partition=%DRIVE%
%BCDEDIT% -set %WINPE_GUID% systemroot %WINRE_ROOT_DIR%\windows
%BCDEDIT% -set %WINPE_GUID% detecthal yes
%BCDEDIT% -set %WINPE_GUID% nx optin
%BCDEDIT% -set %WINPE_GUID% winpe yes

goto :EOF

REM
REM Procedure to create a BCD entry for WinRE installed as a WIM file
REM

:CREATE_WIM_BCD_ENTRY

REM
REM {ad6c7bc8-fa0f-11da-8ddf-0013200354d8}
REM
set RAMDISK_OPTIONS={ad6c7bc8-fa0f-11da-8ddf-0013200354d8}

REM
REM {572bcd56-ffa7-11d9-aae0-0007e994107d}, GUID for the WinPE boot entry
REM

set WINPE_GUID={572bcd56-ffa7-11d9-aae0-0007e994107d}

REM
REM Create Ramdisk device options for the boot.sdi file
REM
%BCDEDIT% -create %RAMDISK_OPTIONS% -d "Ramdisk Device Options" -device
%BCDEDIT% -set %RAMDISK_OPTIONS% ramdisksdidevice partition=%DRIVE%
%BCDEDIT% -set %RAMDISK_OPTIONS% ramdisksdipath \boot.sdi

REM
REM Create WinRE boot entry
REM

%BCDEDIT% -create %WINPE_GUID% -d "Windows Recovery Environment" -application OSLOADER
%BCDEDIT% -set %WINPE_GUID% device ramdisk=[%DRIVE%]\winre.wim,%RAMDISK_OPTIONS%
%BCDEDIT% -set %WINPE_GUID% path \windows\system32\boot\winload.exe
%BCDEDIT% -set %WINPE_GUID% osdevice ramdisk=[%DRIVE%]\winre.wim,%RAMDISK_OPTIONS%
%BCDEDIT% -set %WINPE_GUID% systemroot \windows
%BCDEDIT% -set %WINPE_GUID% detecthal yes
%BCDEDIT% -set %WINPE_GUID% nx optin
%BCDEDIT% -set %WINPE_GUID% winpe yes

goto :EOF


REM
REM Procedure to show usage information
REM

:SHOW_USAGE

echo.
echo This script configure auto failover settings for the specified WinRE.
echo.
echo Usage:
echo %SCRIPTNAME% /target (WinRE path) [Options]
echo.
echo Options:
echo.
echo /target (drive where WinRE is installed) [required]
echo The drive where WinRE is installed w/o the trailing backslash,
echo e.g., C:
echo.
echo /wim [optional]
echo Specifies that WinRE.wim file is installed on target drive. The script
echo assumes that the name of the WIM file is WinRE.wim and the
echo name of the SDI file is boot.sdi
echo.
echo /partition (partition number of the WinRE drive) [optional]
echo Partition number for the above WinRE drive. By default
echo the script assumes partition number 1.
echo.
echo /disk (disk number of the WinRE drive) [optional]
echo Disk number of the above WinRE drive. By default the script assumes
echo disk number 0.
echo.
echo /gpt [optional]
echo The target disk is a GPT disk. By default the script assumes
echo an MBR disk.
echo.
echo /mainos (guid of the main OS) [optional]
echo Use the specified GUID for the main OS. By default the script
echo assumes the current OS. Note -- always specify this option when
echo running from WinPE. To configure the default OS in BCD specify
echo {default}.
echo.
echo /nohide [optional]
echo Don't hide the winre partition
echo.
echo /bcdedit (Full path to bcdedit.exe) [optional]
echo Use the specified bcdedit.exe. By default the script assumes
echo that bcdedit.exe is in the PATH environment variable.
echo.
echo /bcdstore (Full path to BCD store) [optional]
echo Use the specified BCD store. By default the script assumes
echo the system BCD store.
echo.
echo /diskpart (Full path to diskpart.exe) [optional]
echo Use the specified diskpart.exe. By default the script assumes
echo that diskpart.exe is in the PATH environment variable.
echo.

goto :EOF



============================================================================
the diskpart is in the system32 directory of VistaPE(DVD)
===========================================
here is another ready made ISO to play around with
http://neosmart.net/blog/2008/windows-vist...-disc-download/

Regards Ben
......................................................
Bootrec.exe located in X:\windows\system32 of PE

open a command line in A43.exe
bootrec arguments

Repairs critical disk structures. The following commands are supported:



/FixMbr -- writes the master boot record of the system partition using the master boot record

compatible with Windows Vista. This operation does not overwrite the existing partition table.



/FixBoot -- write a new boot sector onto the system partition using the boot sector compatible

with Windows Vista.



/ScanOs -- scan all disks for installations compatible with Windows Vista and display the

entries that are currently not in the boot configuration store.



/RebuildBcd -- scan all disks for installations compatible with Windows Vista and allow the user

to choose which to add to the boot configuration store.

................................................................................
....................................
Ben_Mott
hello again,
this is a question for any vista knowledgeable people including MicroSoft people
does any body know if one can mount any other image apart from .WIM images
for instance ISO images with imagex ????

can one mount ISO with ULTRAiso prog for read write for instance??
or imgBURN in read Mode ??

or any other utility??

regards BEN
jaclaz
I replied to your other post:
http://www.911cd.net/forums//index.php?sho...c=22259&hl=

jaclaz
Ben_Mott
@Jaclaz,

Thanks very much for your time.
I read that post Thank you.

===========================
hello jaclaz ,

thank you for that

here is some how related useful information regarding ISO and mounting them etc

more and more laptops now come without floppy drive and CD/DVD drive

An old friend of mine who had bought a bridge game on a DVD was disappointed that he could not play it on his new 10” laptop without a DVD drive as after we installed it using a memory stick
,it kept asking to put the DVD in the DVD drive to do a CRC error check to find out if DVD was the
original and not a copy.

So I decided to research into it for a solution.
The solution is that one should make an ISO of the DVD, using UltraISO
http://www.ezbsystems.com
, or imgBurn in read Mode
http://www.imgburn.com/index.php?act=download
or the Free Alex Feinman ISO recorder
http://isorecorder.alexfeinman.com/isorecorder.htm
once you have created the ISO image of the DVD then you need to mount it.
That is perform a trick of disgusing it as a DVD.
There is a tiny Free program from Microsoft !!! called:
WINXPvirtualCDcontrolPanel
That will do this
http://tinyurl.com/tyxx
it is a zip file expand it and read the text file how to set its driver up.

the above software free from Microsoft works OK but it is old and frankly a bit Amateurish (DIY)
here is a more professional software from Swiss people of same subject.

Virtual Clone Drive
http://www.slysoft.com/en/download.html


http://static.slysoft.com/SetupVirtualCloneDrive.exe

but unfortunatly when you mount the image it is read only and you can not add ay thing to it
not like imagex /mountrw the other Microsoft free utility.

=======================================

Regards Ben
Ben_Mott
hello again,

some one has written a GUI for imagex called Gimagex
http://www.autoitscript.com/gimagex/

it does what those batch files do (.BAT files)

Regards Ben
jaclaz
QUOTE (Ben_Mott @ Apr 30 2009, 09:44 AM) *
some one has written a GUI for imagex called Gimagex


Really? unsure.gif
http://www.911cd.net/forums//index.php?showtopic=20706

jaclaz
Ben_Mott
thanks for the info

it would have been good if imagex.exe could capture an image with password like ghost.exe
may be the author of Gimagex.exe can put an option in dialog box Tab to add password to the .wim image

Ben
Ben_Mott
hello again,
useful info:
How to get DISM?
Mount your Windows 7 and go to the System32 folder of the offline image, and copy the "DISM" folder and "DISM.exe" to your Vista System32 folder.or in XP(C:\Program Files\Windows AIK\Tools\x86)

http://blog.brianleejackson.com/deployment...oot-environment

you can add more Batch files
===========================
;adddrivers.bat
cd \
cd c:\Program Files\Windows AIK\Tools\x86
DISM /image:c:\PE\winpe_x86\mount /Add-Driver /driver:C:\YOUR_FOLDER_OF_INF_DRIVERS\ /recurse
pause

=================================
A nice addition to DISM over the previous peimg command in WINPE 2.0 is the ability to add drivers with the /recurse command. The /recurse command now allows us to simply have all of our drivers in their own directory and tell DISM to scan the root folder and everything beneath it. The number of sub directories won’t matter. I have a huge library of drivers, for example, you will want to have the network and vga drivers for anything that you boot up to in the WinPE environment. By adding the network driver to your WinPE boot environment, it allows you to access network shares for capturing and deploying .wim images.
=============================================================
useful info:
http://blog.brianleejackson.com/category/tutorial

Regards Ben
wes
Ok with all these steps can someone give one post or reply with all the steps needed? I want to take the WINPE part of Vista and add Acronis true image and also all the drivers for the chipset and RAID card if needed. I would also like to see a real explorer like enviroment so i can browse the drives and disk management utilites. another thing that would be nice is a tool like BartPE that does all that for us.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.