Windows PreInstallation Environment

xiaoxiao2021-03-06  75

Windows PreInstallation Environment (Windows PE) is directly translated from the literality is "Windows Pre-installation Environment", Microsoft is released on July 22, 2002, its original explanation is: "Windows PE) is a limited service The minimum Win32 subsystem is based on the Windows XP Professional kernel that runs in the protection mode. It includes the smallest features that run a Windows installer and script, connect to network sharing, automation, and perform hardware verification. "In other words, you can Windows PE is considered to be a mini operating system that only has the least core service. Microsoft launches such an operating system is of course because it has different system functions. If you want to explain with a sentence, I think that the main difference between Windows PE is: it can be customized. You can launch a copy, maintain the minimum operating system volume while ensuring the core service you need, and it is a standard 32-bit window API system platform. Of course, now I don't understand, there is no relationship, let us take care of it carefully.

Windows PE Overview

Even if there is a just explanation, you must still have a short-minded mini operating system, it doesn't matter. Here I will demonstrate the whole process of its run. I believe that you may have a general understanding. Most people received Windows PE disc (including this ISO mirror disc) should be a "Windows XP OPK" CD, meaning the Windows XP OEM Pre-installation Kit CD. In fact, Windows XP OPK CD is a bootable copy of Windows PE 32-bit version, that is, this CD is already an operating system created with Windows PE, we can use it directly to boot the system. Let's take a look at this CD directory structure. There is a total of 352MB, is it big? In fact, since this is a copy (at least a lot of drivers), the size is determined by the custom production at that time, if the 32-bit non-custom version of Windows PE is approximately 120MB of the mirror on the disk.

Guide Windows PE

The author takes into account the network environment and other issues, the main use environments are VMware virtual machines and Virtual PC virtual machines, but these two virtual machine environments have almost no difference between the actual PC environment (that is, if you don't know the virtual machine, it doesn't matter. It is directly running on the real PC).

Set the BIOS to the optical drive boot, and start the system. When "Press Any Key Boot from CD" appears on the screen screen, press any key to boot from the Windows PE boot on the CD. If your storage device driver is not supported, press the F6 button to load the driver of a special device at startup. When starting to the desktop, the system will do some work such as adjustment resolution, and finally open the default CMD command line interpretation tool, let's see, is a genuine graphic operating environment.

It can be seen that the desktop is empty, don't expect to take a rat point to point, after all, is a minimized graphics operating system that is not installed. However, it is indeed a standard window environment, with notepad on the disc, enter "notepad" in the command line and can be opened by entering; in addition, although the executable command line tool with the disc is limited, but it can be Add, see what this is? Yes, it is our most familiar minesweeping game (now knowing the head, huh, huh), play the first play, this is the author added from everyone's familiar WinXP operating system (simple, use ISO The tool is directly copied into the mirror file just now). Then go back to the CMD command line tool first. The default directory is / i386 / system32 /, enter the command line "DIR * .EXE / W" to see what runable programs. Below we actually study the operation of Windows PE characteristics that have practical significance to individual users.

Tools for 32-bit and 64-bit operating systems can also be seen in the disc image. For personal users, you can use it directly to directly boot the machine's machine, and implement many of the 32-bit systems, this is There will be one by one behind.

2.Windows PE support for network

When I just dir, we saw the ping command. Readers who were familiar with this command should all know that only the TCP / IP protocol can be used, then don't care about the three seven twenty-one, first come to ping themselves, type "ping in cmd" ping " 127.0.0.1 ", the carriage return is obviously ping, which proves that the TCP / IP protocol is indeed running. Try another command ipconfig on the disc, type it, see the IP address is automatically assigned. Since the network is indeed connected, let's actually use it (there may be a lot of friends who have started touching the computer from the window system "will not know what to do, in fact, there is no imagination, you can use the command in CMD The tool belt "/?" Parameters to query the specific usage method, if you have XP on your machine, then it is more convenient to help the center query, more experiments, master the command line, you will find a lot of convenience).

Now my physical machine and virtual machine have a virtual network that uses the net command in the disc image, type "Net View" in the virtual machine to view the connected server, where the server "XQ-B6QAS26953 EC", the name The virtual machine has connected my physical machine over the network. There is a folder called Tuku on my physical machine has been shared, so type "NET USE E: // XQ-B6QAS26953EC / TUKU" means that the shared directory TUKU mirror on the physical machine is the E of virtual machine. The disk can be freely accessing the shared directory in the virtual machine after success. At this time, you can use this to do remote installations. There are still many parameters that you can check and try to use and try to play the Windows PE powerful network environment. If you just simply access the server, the above two command parameters are basically enough. However, here should remember that the machine with Windows PE can access other operating systems, and inverse operation is not possible, this is due to the limitations of Windows PE itself, we will follow this issue later. In fact, the network environment can be used after Windows PE starts.

3. Create, delete, format and manage NTFS file system partitions with Windows PE

This feature is very practical and convenient for personal users. But many friends are boring after DIR, how only Format.com, no fdisk, there is no way to partition. In fact, this is a misunderstanding, and Windows XP has a dedicated command line tool DiskPart.exe for disk management work, it is a text mode command interpreter that allows you to manage objects directly by using scripts or from command prompts (disks) , Partition or volume), of course DISKPART for Windows PE. Type "DiskPart" in CMD mode and enter the discharge of the DiskPart command line. Type "List Disk", there is two hard drives, which are disk 0 and disk 1, respectively. Type "SELECT Disk = 0" execution means to select the specified disk and transfer the focus to this disk, the next operation is for it (the following operation is the same, use DiskPart on disk, partition or volume Before the command, you must first list the object list, then select the object to give the focus, and only any diskpart commands typed on the object when the object has a focus. Type "Detail Disk" can view the details of the disk 0, and now the disk 0 is entirely an active partition C, the format is FAT32, with a capacity of 16G. Below we take the actual operation into two districts, respectively, 8G primary partitions C and FAT32 format 8g logical partition D in NTFS format, and demonstrate Windows PE to disk. Management operation:

(1) Execute "SELECT Disk = 0" and turn the focus to disk 0. Perform "SELECT Partition 1" to turn the focus to the partition activity C of the disk 0.

(2) Execute "Delete Partition" to delete the original partition C.

(3) Execute "Create Partition Primary Size = 8000" Enter, build a new 8000MB primary partition on disk 0, and the focus will automatically go to the newly established partition.

(4) The "CREATE Partition Extended" is then executed, and the remaining disk space on disk 0 is established to the extension partition.

(5) Complete the "Create Partition Logic" Enter the "CREATE Partition Logic" and created the just-established extension partition as a logical partition.

(6) At this point, we have created a disk 0 that originally active partition C is created as a primary partition and a logical partition, but these two partitions have no drive numbers, and "SELECT Partition 1" will be focused to the main Partition 1, then execute "Assign Letter = C", the drive letter C: allocated to the primary partition. Execute an "Active" Enter to set the primary partition to the activity to boot the system.

(7) Next, "SELECT Partition 3" will be implemented to the logical partition, and "Assign" Enter, which means that the system allocates the next available drive letter to the logical partition, because the drive number D, E is occupied ( D is the disk 1 partition, E is the optical drive, so the system assigns F to the logical partition. However, there is no relationship. Whether we don't care about the order of the driver, we have ended here, and the remaining target is to convert the active partition D of the disk 1 into partition E.

(8) Execute "SELECT Disk 1" to turn the focus to disk 1. Execute "SELECT Partition 1" to transfer the focus to the active partition D. (9) Since the D partition of the disk 1 is an active primary partition, it is clear that it is obviously to re-establish it into a non-main partition driver, then it will not occupy the drive letter D and will Let the logical partition to disk 0. Execute "DELETE Partition" to delete the original partition D, execute "CREATE Partition Extended" CREATE Partition Extended "to establish all disk space all disk space on disk 1 to the extension partition.

(10) Complete the "CREATE Partition Logic" to create the "CREATE Partition Logic" to create the just-established extension partition as a logical partition.

(11) Finally, the "Assign" automatically assigns the drive number, and the system still gives D to it (but the system will automatically adjust when the machine is restarted, and the DC partition that assigns D to disk 0, the logical partition of the disk 1 uses the drive E, while the optical drive is delayed to F, and the change in the system will be automatically implemented).

(12) Now we ended the re-partition of the hard drive on the machine, execute "exit" exits the DiskPart command line interpretation tool, then execute "Format C: / FS: NTFS", format the DISK 0 main partition that is just created For the partition of the NTFS file format, "Format D: / FS: FAT32", "Format F: / FS: FAT32", and "Format F: / FS: FAT32" will be implemented, and our final operation is completed.

(13) After completing the "exit" to restart the machine, you can enter "DiskPart" again to see if the partition is correct.

The above operation basically includes creation, deletion, formatting, and management of the disk, if you read the help instructions again, ensure that you will no longer want to use fdisk to manage the disk after you master it. In fact, if you use Windows XP, these knowledge is very practical. In addition, the "DiskPart" tool is the most convenient place to support scripts, which will not be described in detail here.

Restrictions on Windows PE

Above we have practiced the basic operations of Windows PE characteristics, you should be able to experience the convenience of Windows PE to individuals, but just like above, Windows PE is just a limited functional MINI operating system, to be correct Using Windows PE, of course, it is also necessary to understand some of its restrictions.

1. In order to prevent it from being used as a pirated operating system, Windows PE will automatically exit and restart after continuous use 24 hours.

2. You can directly access the server and share from the Windows PE computer through the network. However, any file or folder on the Windows PE computer cannot be accessed from another location on the network. Windows PE obtains network connections to the file server through the NetBIOS on TCP / IP, and does not support other methods (such as IPX / SPX Network Protocol).

3. Because of the anti-piracy, the custom version of Windows PE can be created from the Windows XP Professional CD. No members from Windows XP Home Edition or Windows 2002 Server operating system families.

4. Windows PE is too big and cannot be placed on the floppy disk. Windows PE only includes a subset of available Win32 APIs (including I / O (Disks and Networks) and core Win32 APIs). If the service running in Win32 is based on the Win32 API subset, it is available in Windows PE to be available. The API that Windows PE does not support here, anyway, rundll32.exe and shell.dll are not supported, you want to play quake, you want to play QUAKE below Windows PE or give up early. Windows PE

Many friends see if there is no harvest, and will definitely think that Windows PE has a clear role in yourself. Here you may wish to summarize it.

1. Convenient and easy to use startup tool disc

Through the narrative, you can see that Windows PE starts quite fast, and it is not high to start the environment; the most valuable is that although the name is a startup disk, its function is almost equivalent to installing a Windows XP "command line" Version "- Don't forget the network support. Therefore, for personal computer users, as long as they are burned on a disc, they can be safely solved by the issues such as the initialization system; for small network environments (such as Internet cafes, etc.) users, this feature is particularly useful.

2. Interesting hard drive usage

Custom Windows PE can be placed on those mobile storage devices such as CDs, but also on hard drives. Because many friends will think that there is no significance to put Windows PE's custom versions on the hard disk, is there. Put Windows PE on the hard disk should be the most interesting place, and do not say that your operating system is damaged without entering, the Windows PE on the hard disk can be conveniently fixed, the key is due to Windows PE on the hard disk, so in Windows The installation application is possible in the PE environment. Oh, open the forehead, don't talk, let's take a look at how to put the custom Windows PE on the hard disk (only 32-bit version of Windows PE on the hard disk).

First install the recovery console:

(1) Place the Windows XP Professional CD in the CD-ROM drive, specifying it as CD_DRIVE.

(2) Run CD_DRIVE / I386 / WINNT32.EXE / CMDCONS in the command line CMD window.

Then place the Windows PE custom bootable copy on the hard disk, as follows:

(1) On the target hard disk, create a "c: / minint" directory (here you must name "minint").

(2) Copy all the contents under Windows PE "root directory / i386" to C: / minint.

(3) Copy WinBom.ini to the root directory of the target hard drive from the Windows PE root directory.

(4) On the target hard disk, "c: / cmdcons/txtsetup.sif" is changed to read / write.

(5) Copy "C: /minint/txtSetup.sif" on the target hard disk to "C: / CMDCONS" to overwrite.

(6) Restart the target computer. On the Boot menu, select Boot to the Command Console, and your computer will use Windows PE boot.

3. WINDOWS XP OPK CD's job

The above mentioned in fact, we got it is an executable copy of Windows PE, which is Windows XP OPK (Windows XP OEM Pre-installation Toolkit) CD. From the name, it knows that its original job is for convenience of OEM. If you open the disc in a Windows operating system environment, it will automatically run Autorun to install a "Windows Installation Manager" toolkit for your system. With it, you can easily manufacture Windows installation mirroring with computer vendors OEM logo. Although this is the main job of Windows XP OPK CD, it is obvious that there is no significance to our individual, of course, if you want to put the Windows installation CD on your hand, you have a unique mark, and show it when you install it on your friend's machine. Then use it is a good idea. Of course, my own "imprint" is not as simple as the OEM logo. In fact, you can set the software carried by Windows PE, and you can set these software to run when Windows PE is started; ideally, you can even be customized. Windows PE version plus graphic shell similar to Windows Explorer - Is it designed for vendors OEM? Four, custom Windows PE

1. Customize the startup process of Windows XP OPK CD

This is of course the easiest way to customize, simply to you only need to put a copy of the INI file you write on the floppy disk.

Enter the Windows PE directory in the Windows XP OPK CD, you can find a file called "Startopk.cmd". In fact, this CD boot system starts to the later period, will execute Startopk.cmd (here the CMD file is similar to BAT batch) File, you can edit manually). Open Startopk.cmd, only one line of command "factory -windows PE", which means finding the winbom.ini file, and sequentially handles the command part of this file. Winbom.ini is critical to the startup process of Windows PE, let's take a look at what features that can be used by default:

(1) Copy the test device to the target computer and run the hardware diagnostics.

(2) Operating procedures, such as partitioning and formatting applications.

(3) Use the "NET Use" command to create a network connection, and change the directory to the pre-installed image.

Therefore, it is necessary to customize the startup process of Windows PE. Of course, we cannot let go of WinBom.ini. The key is how the system finds this file - because the WinBom.ini file on the CD media is clearly unrelated. Here Windows PE has made a clever design that makes Factory.exe first searches for the Winbom.ini file at the movable media drive (such as the floppy drive). So you only need to edit the winBom.ini file, and put it in the root of the floppy disk, you will insert this floppy disk when Windows XP OPK CD is started, then the factory command will give priority to the WinBom.ini file content on the floppy drive. In this way, you can control the startup of this Windows XP OPK CD.

I understand how to control the startup of the Windows XP OPK CD, then the definition of the startup task is the content of the winbomb.ini file itself. When Windows XP OPK C runs the command factory -windows PE, it will handle WinBom.ini in the following order. Command section in the file: [Windows pe.Net], [Diskconfig], [OEMRunOnce], [OEMRUN], [Windows PE], Restart item in [UpdateSystem], [Windows PE]. Of course, it is actually more than those parts of the WinBom.ini file, but these key items are sufficient for usual production. We can open the WinBom.ini file of this Windows XP OPK CD in his hand to see, the content is unexpected and simple? Since the WinBom.ini's bracket has been written, the default parameters have also been set. To customize, as long as the command parameters you contain, you can reach the startup effect you want, this definition is also a certain limit. , Detailed settings can read the reference instructions on the Windows XP OPK CD, which are very simple, and most of them have an example, so it is not difficult to understand. 2. Production of Windows PE can start ISO copy

The above has been mentioned that usually we have a Windows XP OPK CD is a Windows PE based on a 32-bit version of bootable copy, which can achieve certain freedom by custom startup process. However, if you want to configure Windows PE to use different drivers groups, or add custom programs, etc., the above methods are not available. At this time, you can create a custom Windows PE version, which is of course the most characteristic of Windows PE. Let's take a look at the creation process of Windows PE custom versions before joining custom features:

1. Create a new directory on the hard disk, assume it "build_location".

2. Insert the OPK CD into the CD driver, and specify below to "cd_drive".

3. Copy all the files under CD_DRIVE / Windows PE to the build_location directory.

4. Copy the factory.exe and netcfg.exe files in the CD_DRIVE / TOOLS / Platform directory to the build_location directory. If you are creating a 32-bit version of Windows PE, the value of the Platform is x86.

5. Remove the OPK CD from the CD driver.

6. If you are creating a 32-bit version of Windows PE, insert the Windows XP Professional CD into the CD-ROM.

7. Go to Build_Location in command line mode, run the following command:

Mkimg.cmd source_directory destination_directory [image_name]

The above mentioned above, CMD is similar to the BAT batch file, mkimg.cmd and Startopk.cmd in the same directory, you find it can run with parameters: "Source_Directory" is used to specify the location of the Windows XP Professional 32-bit version CD, if Source_directory is a CD-ROM, just specify the drive letter, pay attention to not include the rear slash in the source_directory; "destination_directory" is used to specify the generated version of the storage path (not an ISO file, but a hard disk version). "Image_name" is optional, of course, the purpose here is to generate an ISO mirror file, so you should specify its path and file name here. Note that you can burn the ISO file to the CD, if you want this CD to be a system boot CD, remove the Bootfix.bin file under the i386 directory before creating the ISO file. 3. Custom features join

Follow the steps above, you can make a copy of the Windows PE, but it is clear that you have not done a custom work. Enter the Windows PE directory in the Windows XP OPK CD, you can see other cmd files except the Mkimg, Startopk file mentioned above, and another CMD file: startnet.cmd, I have said that the Windows PE boot system is started to the later period, Execute Startopk.cmd. However, when you create your own Windows PE version, it will use the commands in StartNet.cmd instead of Startopk.cmd. The default startnet.cmd file does not directly use the "factory -windows pe" command, we will look forward to the content:

Regsvr / 32 / s Netcfgx.dll

Factory -minint

Netcfg -v -windows pe

Net Start DHCP

Net Start NLA

A: /FLOPPY.CMD

You can see this version of STARTNET.CMD, including the factory -minint command (meaning using "Plug and Play" Installing the Network Interface Card), followed those commands more flexible to install and launch network services. Obviously, we have free modifications to StartNet.cmd, so the custom Windows PE copy can be used to perform the startup task according to our wishes. For example, in STARTNET.CMD to join the "NET USE E: // Network Visible Server / This Computer Shared Directory" command, then the Windows PE will automatically share this server (ie, the host in the domain visible in the online neighbor). The directory map is the local hard disk E. More complex, more freely operates by writing CMD files, such as "A: /FLOPPY.CMD" commands in StartNet.cmd default.

FLOPPY.CMD is an optional command that can contain any commands typically running at the command prompt, such as launching an application or other command line windows that open the run script. You only need to write floppy.cmd and put it in the root of the floppy disk (you can also use other file names and storage locations, but to modify the contents of startnet.cmd accordingly), when you use the Windows PE to start the system, this floppy disk Put the floppy drive to achieve more flexible custom content. For example, in FLOPPY.CMD, "Format C: / FS: NTFS" is added, then Windows PE is started if there is a FLOPPY.CMD file when searching, and it will perform a command formatted to NTFS formatting in the C disk; of course, if not The floppy disk is placed in a floppy drive, and Windows PE will not be wrong. This actually gave us great freedom, making the WINDOWS PE startup when the WINDOWS PE is started by controlling the "A: /FLOPPY.CMD" file. For example, in this article, if it is a new machine, you can write a series of disk management commands such as partition, format, conversion file format, and add it to floppy.cmd, so use After the Windows PE starts the machine, a series of operations such as the partition will be automatically completed, which greatly reduces the tedious task of work, especially when completing repetitive tasks such as batch installation, will be greatly reduced. Finally, a summary of customization: If you don't want to make a launch copy of Windows PE, you can use the Windows XP OPK CD to start the machine and control the startup process through the WinBom.ini on the floppy disk. If you want to implement more custom content, create an ISO boot copy and burn it to the disc, so that you will be customized after starting the machine. Obviously Windows PE has a very flexible and powerful launch method, which is undoubtedly the reason you choose to replace other startup methods.

转载请注明原文地址:https://www.9cbs.com/read-108851.html

New Post(0)