无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 1774|回复: 1
打印 上一主题 下一主题

something about windows preinstallation environment

[复制链接]
跳转到指定楼层
1#
发表于 2002-8-21 00:44:32 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
来自驱动之家:
微软:Mini神秘操作系统-WINPE抢先曝光   - 2002-07-23 11:42:38.043 P兔毛毛   |   
微软今天宣布推出Windows Preinstallation Environment (WinPE)操作系统,根据WINPE操作系统的Readme文件显示,WINPE是一个迷你操作系统,急于WINXP内核架构,包含了维持Windows安装和运行的必须文件。
WINPE可以让使用者对硬盘在视窗操作界面当中,进行分区(diskpart.exe)和格式化(format.com)的工作,可以让使用者访问NTFS文件系统和内部网络。WINPE环境可以支持任何使用win2k或者winxp驱动程序的存储设备。
为了防止WINPE被用作盗版操作系统,WINPE将在连续使用24小时后,自动重新启动。
WINPE主要的作用就让使用者从传统基于 MS-DOS的系统维护工具上转移到基于32bit视窗API的系统维护平台,因此使用者可以轻松地在标准的开发环境,如微软Visual Studio当中维护这些程序,WINPE内含的硬件诊断工和其他预安装工具可以使用WINXP数字签名的硬件驱动程序,无需16bit的IHV硬件驱动程序。
WINPE由于文件尺寸较大,无法拷贝到一张软盘上,但是使用者可以将其放置在任何启动介质上,如启动CDRO,DVD(ISO格式),RIS,或者硬盘上。
2#
 楼主| 发表于 2002-8-21 00:46:32 | 只看该作者

something about windows preinstallation environment

WinPE readme file:

Windows Preinstallation Environment (WinPE) 1
Windows Preinstallation Environment (WinPE) Features. 2
Order of Operations in WinPE. 2
Initial Startup. 3
Win32 Subsystem.. 3
Limitations of WinPE. 4
Windows APIs That Are Not Supported on WinPE. 4
Size of WinPE. 5
Commands in the Startnet.cmd File. 5
Extensions of the Basic Process: Further Customizations of WinPE. 6
Include a specific Winbom.ini file or Startnet.cmd file. 6
Include Hardware Diagnostics or Other Basic Tools. 6
Add or Remove Mass Storage Drivers. 6
Adding Optional Component Packages to WinPE. 7
Creating a Bootable Version of WinPE on CD or DVD.. 7
Placing a Bootable Version of WinPE on a Hard Disk. 9
Placing a Bootable Version of WinPE on a RIS Server 10
Other references: 11
Windows Preinstallation Environment (WinPE)
Windows Preinstallation Environment (WinPE) is a minimal operating system, based on the Windows XP kernel and contains the minimal functionality you need to run and automate Windows Setup.
WinPE lets you create (diskpart.exe) and FORMat (FORMat.com) disk partitions, and gives you access to both NTFS file system partitions (with some constraints) and your internal network. The environment supports all mass storage devices that use Windows 2000 or Windows XP drivers, and you can incorporate additional drivers as new devices become available.
To prevent its use as a pirated operating system, the Windows Preinstallation Environment (WinPE) reboots automatically after 24 hours of continuous use.
Using WinPE allows you to port your existing MS-DOS-based tools to a subset of the 32-bit Windows APIs, so you can more easily maintain these applications in a standard development environment, such as Microsoft Visual Studio. These hardware diagnostics and other preinstallation utilities can then use the same signed Windows XP drivers in the computers you manufacture, and you will no longer need to request 16-bit drivers from independent hardware vendors (IHVs).
While WinPE is too large to fit on a floppy disk, you can place your customized version of WinPE on any bootable media, including a CD-ROM, DVD (ISO FORMatted), a Remote Installation Server (RIS), or on a machine’s hard disk.

--------------------------------------------------------------------------------
Windows Preinstallation Environment (WinPE) Features
Windows Preinstallation Environment (WinPE) is a minimal Win32 subsystem with limited services, based on the Windows XP Professional kernel running in protected mode. It contains the minimal functionality you need to run Windows Setup, pull an operating system from a network share, automate basic processes, and perFORM hardware validation.
The Windows XP OPK CD is itself a bootable copy of the Windows Preinstallation Environment (WinPE) (32-bit version) that supports all mass-storage and networking drivers contained on the Windows XP Professional CD.
WinPE provides the following features:
·        A hardware-independent Windows environment for both x86-based architectures, with a small footprint on both the bootable media and in memory.
·        A subset of the Win32 API, a command-line interface (Cmd.exe) capable of running batch files, and support for standard scripting environments used to create custom tools or scripts.
·        Network access and support for standard network drivers that may be required for copying images and test suites from a network using TCP/IP. You can easily add or remove network drivers from a customized version of WinPE.
·        Support for all mass-storage devices that use Windows 2000 or Windows XP/Windows Whistler drivers. As new devices become available, you can easily remove unneeded drivers or incorporate additional drivers into a customized version of WinPE.
·        Native support to create, delete, FORMat, and manage NTFS partitions.
·        Hardware diagnostics can be run by loading and testing specific hardware drivers.
·        Support for PXE, which can be used to install images from a Remote Installation Server (RIS). If the network card in the computer includes PXE, the card can detect a RIS server and automatically install the WinPE image.
Order of Operations in WinPE
When you start a computer using WinPE, you are running the command factory -winpe, which processes these sections in Winbom.ini in this order (further inFORMation on winbom.ini is available in the file ref.chm in the deploy.cab on the Windows XP CD):
[WinPE.Net]
[DiskConfig]
[OEMRunOnce]
[OEMRun]
[WinPE], except for the Restart entry
[UpdateSystem]
the Restart entry in [WinPE]
Initial Startup
WinPE uses the Windows Setup loader rather than the regular boot loader to load Windows. In the initial boot of WinPE, Setup Loader loads the mass-storage device drivers listed in Winpeoem.sif. If no drivers are listed in Winpeoem.sif, Setup Loader loads all of the mass-storage devices normally present in Windows XP Professional.
WinPE will attempt to use the highest screen resolution possible, up to 800x600, 24-bit.
While WinPE is starting, press F6 to load a particular device that does not have in-box support and is not listed in Winpeoem.sif.
Note
·        For more inFORMation about txtsetup.oem, see the Microsoft Windows Device Driver Kit at http://www.microsoft.com/ddk/.
When starting WinPE from a CD, Plug and Play detects the network card installed on the computer, loads the appropriate driver, and binds the network stack. To father reduce the time required to detect the network card, you can customize WinPE to only search for a given set of network drivers, rather than all the network drivers normally present in Windows XP Professional.
WinPE loads a standard, single-CPU HAL. Press F5 to load a particular HAL.
Win32 Subsystem
When the Win32 subsystem starts, by default WinPE starts the Cmd.exe shell. You can customize WinPE to use an alternative shell or application. If Factory.exe does not find a Winbom.ini file, either in the WinPE image or on a floppy disk, it stops running.
The settings in winbom.ini provide a wide range of preinstallation tasks. To perFORM tasks beyond the scope of Winbom.ini, create batch files to either replace or supplement Winbom.ini.
With WinPE running, you can use Winbom.ini or your own batch files to do any of the following:
Copy a test harness to the destination computer and run hardware diagnostics.
Run programs, such as a utility to partition and FORMat the drives.
Establish network connectivity with the NET USE command, and change directories to the location of the preinstalled images.
Start the unattended Setup from a network source.
WinPE stores the registry hives in memory so that applications can write to the registry. Any changes made to the registry by the applications do not persist across different WinPE sessions.
Limitations of WinPE
WinPE has the following limitations:
·        To prevent its use as a pirated operating system, WinPE automatically exits whatever shell it is running and reboots after 24 hours of continuous use.
·        A computer running WinPE can make a maximum of four network connections.
·        From a WinPE computer, you can directly access servers and shares across the network, based on the required network credentials. However, you cannot access any files or folders located on a WinPE computer from another location on your network.
·        You cannot access any files or folders located on a DFS share.
·        The tested methods of gaining network connectivity to file servers are TCP/IP and NetBIOS over TCP/IP. Other methods, such as the SPX/IPX network protocol, are untested and unsupported.
·        WinPE requires a VGA-compatible device and will attempt to use the highest screen resolution possible, up to 800x600, 24-bit.
·        WinPE is too large to fit on a floppy disk.
·        Because of anti-piracy concerns, you can only build a customized version of WinPE from the Windows XP Professional CD
·        You cannot build a custom version of WinPE from Windows XP Home Edition or any member of the Windows Whistler Server family of operating systems.
Windows APIs That Are Not Supported on WinPE
To minimize its size, WinPE includes only a subset of the available Win32 APIs, including I/O (disk and network) and core Win32 APIs. If a Win32 API subset is exposed based on a service running under Win32, it may or may not be available under WinPE.
The following categories of functions of the Win32 API set are not present in WinPE. For more inFORMation on these categories, see the Microsoft PlatFORM SDK (http://msdn.microsoft.com/library/default.asp).
Windows Multimedia
Still Image
OpenGL
NetShow Theater Administration
Bitmap
Brush
Windows Shell
Access Control
Power Options
Printing and Print Spooler
Window Station and Desktop
Terminal Services
User Profile
Tape Backup
Size of WinPE
The approximate size of a non-customized version of WinPE is as follows:
PlatFORM
On-disk image size
In-memory size
32-bit x86 computers
~120 MB
~40 MB

In-memory sizes are computed when networking services are running.
The size of a custom version of WinPE will vary, depending on the set of drivers you choose to include or exclude. The on-disk size of the default WinPE configuration includes all in-box drivers, and many of these drivers are uncompressed.
The approximate size of each directory on the 32-bit version of WinPE is as follows:
Directory
Approximate size
\System32
66 MB
\System32\Drivers
29 MB
\inf
4 MB
\fonts
9 MB

While WinPE is too large to fit on a floppy disk, you can place your customized version of WinPE on any bootable media, including a CD-ROM, CD-ROM, DVD, hard disk, LS-120 floppy disk, or a Remote Installation Services (RIS) Server.
Commands in the Startnet.cmd File
The commands in the default Startnet.cmd file are as follows:
regsvr /32 /s netcfgx.dll
factory -minint
netcfg -v -winpe
net start dhcp
net start nla
a:\floppy.cmd
Instead of using the factory -winpe command, this version of Startnet.cmd includes the factory -minint command followed by a netcfg command. This sequence of commands allows for more flexible control over installing and starting network services.
Floppy.cmd is a sample file. It can contain any commands normally run at a command prompt. For example, you can launch applications or open additional command windows that run scripts.
Extensions of the Basic Process: Further Customizations of WinPE
You may choose to further customize this version of WinPE in one or more of the following ways before burning it to a CD or copying it to a hard disk.
Include a specific Winbom.ini file or Startnet.cmd file
You can include a generic Winbom.ini file in a custom WinPE installation that specifies basic inFORMation about connecting to your network, FORMatting the hard disk, and running basic hardware diagnostics.
You can include a generic winbom.ini file in a custom WinPE installation. Factory uses this file if another Winbom.ini is not located in the floppy drive. After using the settings in [WinPE.Net] to establish network connectivity, the Factory tool can use the NewWinbom entry to point to another Winbom.ini file located on the network.
You can use the [OEMRun] section in the Winbom.ini file to customize the script that starts. You can also create your own version of Startnet.cmd to run a specific set of commands, batch files, or scripts.
To gain access to Windows Networking APIs, run the command netcfg -winpe from the WinPE command line.
Include Hardware Diagnostics or Other Basic Tools
Add or Remove Mass Storage Drivers
By default, all network drivers on the Windows XP Professional CD. When you create your own WinPE image, you can add or remove the network drivers or replace the network driver list. By keeping the list to a minimum, you reduce the time required for PnP detection.
Customize the Winpeoem.sif file to control which mass storage drivers are loaded in WinPE.

Adding Optional Component Packages to WinPE
Optional component packages for WinPE are available in the Extras folder on the CD/image. This folder can be completely deleted to minimize the size of your WinPE image. Optional component packages are available for WSH (Windows Script Host), HTA (HTML Applications) and ADO (MDAC) to allow database connectivity from WinPE to a Microsoft SQL Server. Note that HTA is dependent on WSH, so if you choose to use the HTA components in WinPE, you will also have to include the WSH components.

To add the HTA or WSH components to your WinPE image, place the contents of their respective ZIP file into the System32 directory of your WinPE image. There are three steps required to place ADO components into your WinPE image:
Place the 35 individual files into the System32 directory of your WinPE image, as above.
Place the Registration directory inside of the I386 (or MiniNT, if on the HDD) folder of your WinPE image
Place the Program Files directory at the root of your WinPE image (as it would be in a traditional Windows installation).
To automatically start one or more of them, start their launch file (component.bat, such as HTA.bat) from your startnet.cmd file. You can also manually launch each component.
Creating a Bootable Version of WinPE on CD or DVD
Modify the included version of WinPE to suit your needs (include any system images, applications, scripts, etc that you wish to include in your final CD/DVD).
Once you are satisfied that your image is complete, do the following to create a CD image:
1.      Open a command prompt (Start | Run | cmd.exe).
2.      Change directories to the location where you have a copy of etfsboot.com and OSCDImg (included in the Buildtools.zip in the Extras folder)
3.      Run the following command (must include the switches listed):
OSCDImg –betfsboot.com –n sourceroot destination.iso

Command-line options for OSCDImg.exe
Option
Action
-llabelname
Specifies the volume label. No spaces between the l and the labelname.
For example: -lMYLABEL
-tmm/dd/yyyy,hh:mm:ss
Specifies the time stamp for all files and directories. Do not use any spaces. Use the American date FORMat and a 24-hour clock. May use any delimiter between the items.
For example: -t12/31/2000,15:01:00
-g
Use the Universal Coordinated Time for all files rather than the local time.
-h
Include hidden files and directories.
-n
Allow long file names.
-blocation
Specifies the location of the El Torito boot sector file. Do not use any spaces.
For example: -bc:\directory\Etfsboot.bin
sourceroot
Required. Specifies the location of the WinPE files that you want to build into an .iso image.
image_file
Specifies the name of the .iso image file you want to create that contains the WinPE files.


Where sourceroot is the source of your WinPE image (example: c:\WinPE) and destination.iso is the resulting ISO image (example: c:\WinPE.ISO). Note that there is no space in –betfsboot.com – this switch can also contain the full path to etfsboot.com, such as –bc:\WinPE\etfsboot.com. You should generally not redistribute etfsboot.com and oscdimg.exe with your WinPE images as they are not needed on the WinPE image itself.
4.      Use any third-party tool that will burn ISO images to CD to create your CDs.
To create an ISO FORMatted DVD (UDF and UDF/ISO bridge media are not supported in WinPE), the process is effectively identical. Create your ideal WinPE image (including, perhaps, an entire Sysprep desktop image of several GB). Complete the same steps above, but include the –m command-line switch. This overrides the block that checks to make sure your ISO image will fit on a CD. Note that by doing this, you will need to manually check to insure your resulting image will fit on the final DVD recordable media or DVD 5 or 9 (if you are having your media mastered), as OSCDImg will not check for ISO image size above CD standards. You can then use any third-party tool that will burn ISO images to DVD to create your WinPE DVD.
Important: To configure the WinPE CD so that it boots from the CD every time, if the WinPE CD is present in the CD-ROM drive, remove the \i386\Bootfix.bin file from the WinPE directory structure before you create an .iso file.

Placing a Bootable Version of WinPE on a Hard Disk
You can only place a 32-bit version of WinPE on a hard disk.
Before you begin, you must FORMat the destination hard disk and install the Recovery Console on this hard disk.
To install the Recovery Console
Place the Windows XP Professional CD in the CD-ROM drive, denoted as cd_drive. You can do this from inside of an existing Windows installation, or by booting new hardware to WinPE on a CD, DVD, or RIS Server.
Run cd_drive\i386\winnt32.exe /cmdcons.
Now you can place a customized bootable copy of WinPE on this hard disk.
To place WinPE on a hard disk
On the destination hard disk, create a directory called C:\Minint. You must name the directory "Minint".
Copy all of the contents of build_location\i386 to C:\Minint. build_location is the current location of your WinPE build – on a CD, on a network share, or on the hard disk.
For Example:
xcopy C:\Build.x86\i386\*.* /S C:\Minint
where C:\Build.x86 is build_location.
Copy Winbom.ini from build_location to the root of the destination hard disk.
For Example:
copy C:\Build.x86\Winbom.ini C:\
where C:\Build.X86 is build_location.
On the destination hard disk, change the read-only attribute for C:\Cmdcons\txtsetup.sif to read/write.
For Example:
attrib -r C:\Cmdcons\txtsetup.sif
On the destination hard disk, copy C:\Minint\txtsetup.sif to C:\Cmdcons.
For Example:
xcopy C:\Minint\txtsetup.sif C:\Cmdcons
Restart the destination computer. On the Boot menu, select to boot to the Command Console. The computer will boot using WinPE.
Placing a Bootable Version of WinPE on a RIS Server
Prerequisites
The following items are required:
A Windows XP product CD and a WinPE CD of the same build number.
A properly configured Windows 2000 (SP2) or Windows .NET RIS server.
Your destination computers must have a PXE-enabled network interface card (NIC), or have a NIC that is supported by the RIS boot floppy.
Windows 2000 or Windows .NET (beta) RIS Server
To install on a Windows 2000 RIS server, deploy the hotfix referenced in KB article Q287546. Contact your technical account manager (TAM) or Product Support Services (PSS) to obtain this hotfix. This hotfix is not required if you are deploying on Windows .NET Server Beta 2 or newer.
Creating a RIS image and booting from it:
On the RIS server, open a command prompt and run RISetup.exe –add.
When prompted for a source, point RISetup to your Windows XP product CD.
Browse to the location where RISetup installed the image.
For example: \\Server_name\Share_name\REMINST\Setup\Language\Images.
Open the I386 folder in the folder of the image you just created.
Browse to the CD or network share containing your WinPE files, and open its I386 folder.
Copy the contents of the WinPE I386 folder into the Remote Install I386 folder you just opened, overwriting all files if prompted.
Open the Templates folder in the I386 folder you just copied WinPE into.
Open the RIStndrd.sif file in a text editor, and on the line that starts with OSLoadOptions, add the switch /minint.
Start a RIS client, and select the operating system image you created in Step 1. WinPE starts.
Other references:
For further inFORMation on deploying Windows XP, you can consult the help files located in the deploy.cab on your Windows XP CD.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2025-7-24 21:49

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表