|
5#
楼主 |
发表于 2005-7-11 12:55:58
|
只看该作者
Windows XP Embedded 精华文章汇总
Microsoft Windows XP Service Pack 2 (SP2), RTM
Microsoft Windows Preinstallation Environment Version 2004
Readme Document
June 25, 2004
Information in this document, including URL and other Internet Web
site references, is subject to change without notice and is provided
for informational purposes only. The entire risk of the use or
results of the use of this document remain with the user, and
Microsoft Corporation makes no warranties, either express or implied.
Unless otherwise noted, the example companies, organizations,
products, people, and events depicted herein are fictitious. No
association with any real company, organization, product, person,
or event is intended or should be inferred. Complying with all
applicable copyright laws is the responsibility of the user. Without
limiting the rights under copyright, no part of this document may
be reproduced, stored in or introduced into a retrieval system, or
transmitted in any form or by any means (electronic, mechanical,
photocopying, recording, or otherwise), or for any purpose, without
the express written permission of Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks,
copyrights, or other intellectual property rights covering subject
matter in this document. Except as expressly provided in any written
license agreement from Microsoft, the furnishing of this document
does not give you any license to these patents, trademarks,
copyrights, or other intellectual property.
(c) 2004 Microsoft Corporation. All rights reserved.
Microsoft, MS-DOS, Windows, and Windows NT are either registered
trademarks or trademarks of Microsoft Corporation in the United States
or other countries or regions.
The names of actual companies and products mentioned herein may be
the trademarks of their respective owners.
========================
How to Use This Document
========================
To view the Readme file in Microsoft Windows Notepad, maximize
the Notepad window. On the Format menu, click Word Wrap.
To print the Readme file, open it in Notepad or another word
processor, and then use the Print command on the File menu.
========
CONTENTS
========
1. INTRODUCTION
2. KNOWN ISSUES
3. SAMPLES
4. DOCUMENTATION CORRECTIONS
---------------
1. INTRODUCTION
---------------
This document provides current information about the Windows
Preinstallation Environment Version 2004 for Microsoft
Windows XP SP2.
The new features for Windows PE in this release include Windows
Management Instrumentation (WMI) support, driver injection support,
and Windows Firewall integration. For documentation, see "Adding WMI
Support to Windows PE," "Adding Drivers to a Windows PE Image," and
the "WinPEFirewall" entry in the "[WinPE.Net]" topic of Winpe.chm,
located in the \Docs directory.
There is no installer for this CD. Copy the files to your hard disk
and run the tools from there.
Use the Mkimg tool from Windows PE XP SP2 only with
Windows XP SP2 to create Windows PE.
You can use the Windows XP SP2 OPK to preinstall the following
versions of Windows:
* Original "gold" release of Windows XP
* Windows XP SP1 and Windows XP SP2
* Windows Server 2003 family
To preinstall the Windows Server 2003 Itanium-based client,
use the Windows Server 2003 SP1 Itanium-based tools.
---------------
2. KNOWN ISSUES
---------------
* Adding Symbolic Names of Serial Ports to Windows PE
Windows PE does not create symbolic names such as COM1 and COM2
for serial ports. This means that applications cannot detect
and use the serial ports.
Workaround: To create the symbolic names, you can write an
application that calls the DefineDosDevice function and
uses the full device name of the port. Add this application to
Startnet.cmd so that it runs as part of the Windows PE boot
process. When the application is finished, applications
can detect the serial ports by their symbolic names.
You must add a registry key to your offline Windows PE image
before deploying it in order to use the serial ports.
1. Use Regedit to mount Setupreg.hiv in your offline image
to HKLM\test.
2. Add the following key:
HKLM\test\ControlSet001\Services\serial\Parameters
3. Unmount Setupreg.hiv.
The full device name of COM1 when using the ACPI
HAL is:
\\?\ACPI#PNP0501#1#{4D36E978-E325-11CE-BFC1-08002BE10318}
To identify the full device names for serial ports on other HALs,
use the QueryDosDevice function to search for the string "PNP0501".
To use serial ports in custom applications, either refer to the
ports by their full device names or use DefineDosDevice to create
the symbolic names as in this example:
#define COM_PORT_DEV_NAME(n) \
TEXT("\\\\?\\ACPI#PNP0501#") TEXT(#n) TEXT("#{4D36E978-E325
-11CE-BFC1-08002BE10318}")
#define COM_PORT_NAME(n) \
TEXT("COM") TEXT(#n)
DefineDosDevice( 0, COM_PORT_NAME(1), COM_PORT_DEV_NAME(1) );
* The [Components] topic in Winpe.chm is not indexed. Use the
Content or Search tabs in the HTML Help viewer to look up
optional components by name in Winpe.chm.
----------
3. SAMPLES
----------
The \Samples directory contains samples for WMI and driver injection,
and a file named Swinpe.txt used to reduce the size of Windows PE. See
"Reducing the Size of Windows PE" in Winpe.chm for more information
about using Swinpe.txt.
\Samples\WMI\script
Contains .vbs sample scripts that demonstrate various WMI queries.
To run the WMI vbs samples, you must add Windows Script Host support
to the Windows PE image by copying the files generated by the
Buildoptionalcomponents.vbs build tool using the /WSH switch.
Sample scripts:
CIM_LogicalDevice.vbs ;Lists all logical devices
ListProvider.vbs ;Lists all providers and classes in repository
Win32_AllocatedResource.vbs ;Lists all allocated resources
\Samples\WMI\wmismbios
Contains a Visual Studio 2003 VC7 Project that demonstrates a WMI C++
interface. Wmismbios_cpu.exe is a console application that uses the
WMI COM interface to query an instance of an MSSmBios_RawSMBiosTables
class and optionally dump the SMBIOS tables to a file.
Syntax:
wmismbios.exe [-d dumpfile]
[-d dumpfile] file path to dump the raw SMBIOS table
Exit codes:
1 for success.
0 for failure.
Project files:
wmismb.cpp
wmismb.h
wmismbios.ncb
wmismbios.sln
wmismbios.vcproj
readme.txt
Output example:
X:WMI\smbios>wmismbios
DmiRevision: 35
Size: 2083
SmbiosMajorVersion: 2
SmbiosMinorVersion: 3
Used20CallingMethod: False
== BIOS Information (Type 0 / Length 20 / Handle 0x0h)
BIOS Vendor: Dell Computer Corporation
BIOS Version: A05
BIOS Starting Address Segment: 0xf000h
BIOS Release Date: 02/26/2003
BIOS ROM Size: 512k
BIOS Characteristics: 0x000000000000de90h
- ISA Supported: Yes
- MCA Supported: No
- EISA Supported: No
- PCI Supported: Yes
- PC Card (PCMCIA) Supported: No
- PNP Supported: Yes
- APM Supported: Yes
- BIOS Flash Upgradeable: Yes
- BIOS Shadowing Allowed: Yes
- VL-VESA Supported: No
- ESCD Supported: Yes
- Boot from CD Supported: Yes
- Selectable Boot Supported: Yes
- BIOS ROM Socketed: No
- Boot From PC Card Supported: No
- Enhanced Disk Drv Supported: Yes
- INT13H NEC Floppy 1.2MB: No
- INT13H Toshiba Floppy 1.2MB: Yes
- INT13H 5.25" 360KB Floppy: No
- INT13H 5.25" 1.2MB Floppy: No
- INT13H 3.5" 720KB Floppy: No
- INT13H 3.5" 2.88MB Floppy: No
- INT5H Print Screen Supported: Yes
- INT9H 8042 Keyboard Supported: Yes
- INT14H Serial Supported: Yes
- INT17H Printer Supported: Yes
- INT10H CGA MONO Supported: No
- NEC_PC_98: No
BIOS Characteristics Extension 01: 17h
- ACPI Supported: Yes
- USB Legacy Supported: Yes
- AGP Supported: Yes
- I2O Boot Supported: No
- LS-120 Boot Supported: Yes
- ATAPI ZIP Drv Boot Supported: No
- IEEE1394 Boot Supported: No
- Smart Battery Supported: No
BIOS Characteristics Extension 02: 3h
- BIOS Boot Spec Supported: Yes
- Function Key Network Boot: Yes
== System Information (Type 1 / Length 25 / Handle 0x100h)
Manufacturer: Dell Computer Corporation
Product Name: OptiPlex GX260
Version:
Serial Number: 1WC8V21
UUID: 44 45 4c 4c 57 0 10 43 80 38 b1 c0 4f 56 32 31
Wake-up Type: Power Switch
\Samples\PNPENUM
Contains a Visual Studio 2003 VC7 project for a sample utility to
detect PnP DevNode status.
Project files:
pnpenum.cpp
pnpenum.sln
pnpenum.vcproj
readme.txt
Syntax:
pnpenum.exe [-s <service> | -c <class>] [-v]
[-s <service> | -c <class>] ;Filters by service or class
[-v] ;Prints devnode status
Without -s or -c, print all devices
Examples:
pnpenum.exe -v ;Lists all devices with full devnode status
pnpenum.exe -s PCI ;Lists devices controlled by PCI service
pnpenum.exe -s ATAPI ;Lists devices controlled by ATAPI service
pnpenum.exe -c NET ;Lists devices belonging to NET class
pnpenum.exe -c System ;Lists devices belonging to System class
The DEVNODE instance is highlighted in green in the console list. The
level of indentation in the list indicates the node depth in the
tree. See cfg.h in the Windows Device Driver Kit (DDK) for an
explanation of the DN and CM status codes.
The pnpenum sample uses the cfg.h and cfgmgr32.lib from Windows DDK
build 3790. On the build machine, you must have both Visual Studio
2003 and Windows DDK build 3790 installed in order to build the
sample. In VS2003 IDE, choose Tools|Options|Projects|VC++ Directory,
add the DDK installation C:\Winddk\3790\inc\wnet to the Include
files search path, and then add the DDK installation path
C:\Winddk\3790\lib\wnet\i386\ to the Library files search path. The
DDK lib path must be listed after the $(VCInstallDir)PlatformSDK\lib
path.
----------------------------
4. DOCUMENTATION CORRECTIONS
----------------------------
* The section on Winbom.ini in Winpe.chm does not list the [WindowsFirewall]
section.
[WindowsFirewall]
Answer File = Unattend.txt and Winbom.ini
WinbomType = Factory
The [WindowsFirewall] section contains the following user-defined sections
that enable you to configure the Windows Firewall Exceptions list:
[WindowsFirewall.<profile_name>]
[WindowsFirewall.<program_name>]
[WindowsFirewall.<service_name>]
[WindowsFirewall.<portopening_name>]
[WindowsFirewall.<icmpsetting_name>]
For details about the Windows Firewall sections and entries, see the
[WindowsFirewall] section in the Unattend.txt answer file in the
Microsoft Windows Preinstallation Reference (Ref.chm). The user-defined
sections and entries work the same way for both Unattend.txt and Winbom.ini.
Important
The Windows PE firewall features are specific to Windows PE and are not
related to the Windows Firewall. The Windows PE firewall features help
protect Windows PE against malicious users or programs.
* The [WinPE] topic does not list the OptionalSources entry.
OptionalSources
Used when preinstalling Tablet PC or Media Center components as
part of a configuration set.
Syntax
OptionalSources = Yes
Value
Yes
Use the \Cmpnents folder as part of the configuration set.
Example
OptionalSources = Yes
WinbomType
WinPE
Comments
Requires the addition of the \Cmpnents folder containing the Tablet PC
or Media Center files to your configuration set. For more information,
see the installation instructions on the Tablet PC or Media Center CDs.
* In the "Mkimg Command" topic, delete the following sentence:
Use /NOWF only when running server applications such as IIS
on the Windows PE computer.
* The Winpeshl.ini answer file is not listed in the "windows PE Answer
Files" section. For instructions on how to use it, see the "Using a
Custom Shell Application" section of the "Creating a Customizable
Windows PE Image" topic.
* The Windows PE User Guide does not include a topic on the Depend
tool. Located in the \Winpe folder, it identifies missing DLL
dependencies for windows PE applications.
Syntax:
depend [/l] /f:filespec;filespec;... [/d:directory;directory;..]
/s ;Silent mode.
/l ;List all dependencies
If directories are not specified, the Windows search path will be
used to look for dependencies.
Error codes:
0 = OK
1 = errBAD_ARGUMENTS
2 = errFILE_NOT_FOUND
3 = errFILE_LOCKED
4 = errMISSING_DEPENDENCY
5 = errOUT_OF_MEMORY
Example:
To make sure all DLLs required by Myapp.exe are in your Windows PE
image, run Depend with these parameters:
depend /l /f:c:\winpe\i386\system32\myapp.exe /d:c:\winpe\
i386\system32
* Using Multiple Static IP Addresses
You may now specify multiple static IP addresses for as many
network cards as may be installed in the computer. The syntax for
this functionality is identical to existing documentation; append
additional addresses to existing entries, using a semicolon to
separate multiple addresses.
This example installs DHCP to the first network card found in the
system, applies static IP addresses to the next two detected cards,
and applies DHCP to any additional networking cards.
[WinPE.Net]
Startnet = YES
Ipconfig = DHCP;10.1.100.2;1.2.3.4
SubnetMask = DHCP;255.255.248.0;255.248.255.1
Gateway = DHCP;10.1.101.2;10.1.101.3
* Adding INRAM Functionality to Windows PE
The functionality of the /INRAM option of the Osloadoptions command
of the [InfChanges] section of Config.inf has changed. Windows PE
fully loads Win32K.sys into memory, resulting in an improved
CD-swapping experience for recovery scenarios.
To enable INRAM support, add this option to the Osloadoptions command
in the [InfChanges] section of Config.inf:
/INRAM
Example:
Osloadoptions=txtsetup.sif,setupdata,"/fastdetect /minint
/redirect /redirectbaudrate=115200 /INRAM"
|
|