How to make a recovery disc/recovery partition using WinPE

Source: Internet
Author: User
Tags goto

First, use WinPE to make recovery CD

1, first on the development machine to adminstrator users run cmd, into the WES7 installation directory under the Petools folder, such as D:program fileswindows embedded Standard7toolspetools, Run the following command:

Copype.cmd x86 c:winpe_x86

If the target machine is 64 bits, the middle argument "x86" is replaced with "AMD64", and the following path can be arbitrarily specified.

2, then, enter the path specified by the above command, i.e. c:winpe_x86, input:

Copy C:winpe_amd64winpe.wim C:winpe_amd64isosourcesboot.wim (this is online)

Dism/mount-wim/wimfile:c:winpe_x86isosourcesboot.wim/index:1/mountdir:c:winpe_x86mount

Copy C:winpe_x86isobootmgr C:winpe_x86mount

mkdir C:winpe_x86mountboot

Xcopy/cherky C:winpe_x86isoboot C:winpe_x86mountboot

At this point, a simple PE environment has been built, and then you can use the Dism/add-package,dism/add-driver command to add the required components or drivers to the PE as needed, this article describes how to automate the backup/recovery system after PE starts.

3. At the command line, enter:

Notepad Winpeshl.ini

Enter in Notepad:

[Launchapp]

AppPath = 1.bat

Save the file to C:winpe_x86mountwindowssystem32

Then enter at the command line:

Notepad 1.bat

Enter in Notepad:

@echo off

Color 0a

Title Backup/restore System

Echo 1-----Backup

Echo 2-----Restore

Echo 3-----Good bye

Echo.

set/p ans=

If%ans%==1 Goto Backup

If%ans%==2 Goto restore

If%ans%==3 Goto end

: Backup

Imagex/capture c:e:wes7_bakup.wim "WES7 Backup Image"

Goto END

: Restore

Imagex/apply E:wes7_bakup.wim 1 C:

Goto END

: End

Echo.

Exit

Save the file to C:winpe_x86mountwindowssystem32

where "E:" To save the backup image of the partition, "Wes7_backup.wim" as a mirrored file, can be modified according to the actual situation.

Copy the ImageX.exe (located under the WES7 installation path Toolsx86 or AMD64) under the WES7 installation directory to C:winpe_x86mountwindowssystem32, and note the difference between the 32-bit system and the 64-bit system.

If you want to implement automatic partitioning under WinPE, simply copy the partition script Disksp.txt to C:winpe_x86mountwindowssystem32, and then add a row to the batch above: diskpart/s disksp.txt

4, the following start to make WinPE start entry, the command line, in turn, enter the following command:

Del C:winpe_x86mountbootbcd

Bcdedit/createstore C:WINPE_X86MOUNTBOOTBCD

Bcdedit/store c:winpe_x86mountbootbcd-create {bootmgr}/d "Boot Manager"

Bcdedit/store c:winpe_x86mountbootbcd-set {bootmgr} device boot

Bcdedit/store c:winpe_x86mountbootbcd-create/d "WinPE"-application OSLoader

5. When the last command above is entered, a GUID is generated. Then enter the following command:

Bcdedit/store c:winpe_x86mountbootbcd-set osdevice Boot

Bcdedit/store c:winpe_x86mountbootbcd-set Device Boot

Bcdedit/store C:winpe_x86mountbootbcd-set Path Windowssystem32winload.exe

Bcdedit/store c:winpe_x86mountbootbcd-set systemroot windows

Bcdedit/store C:winpe_x86mountbootbcd-set WinPE Yes

Bcdedit/store C:winpe_x86mountbootbcd-displayorder-addlast

In which you want to replace all of the above commands with the GUID generated in step 4th, be sure to take {}.

6. Finally, enter the following command to generate the ISO file:

Oscdimg-n-m-o-bc:winpe_x86etfsboot.com C:winpe_x86mount c:winpe_x86winpe_x86.iso

Then burn the disc with this ISO file, and you can use this CD as the system Recovery disc.

Second, deploy the WinPE to the hard disk

This method is suitable for machines without optical drives, note: The following steps should be WES7 after the target has been deployed. 1, according to the first part of 1, 2, 3 steps to build a good WinPE environment.

2, enter the following command, will do a good WinPE environment packaging:

Dism/unmount-wim/mountdir:c:winpe_x86mount/commit

Copy the packaged Winpe.wim and ImageX.exe to the USB drive for backup.

3, with WES7 IBW CD-ROM to start the target machine, into the installation interface, press the keyboard of the SHIFT+F10, pull out the command line, will be copied winpe.wim u disk access target machine, the system will automatically give U disk allocation letter (assuming F)

Enter the following command on the target machine:

F:imagex/apply F:winpe.wim 1 E:

where f is a U disk letter, E is the partition that WinPE will deploy to. Can be modified according to the actual situation.

4, then enter:

Bcdedit-store c:bootbcd-create/d "WINPE"-application osloader

A GUID is generated, and the GUID is noted.

5, enter the following command in turn:

Bcdedit-store c:bootbcd-set osdevice partition=e:

Bcdedit-store C:bootbcd-set Device Partition=e:

Bcdedit-store C:bootbcd-set Path Windowssystem32bootwinload.exe

Bcdedit-store c:bootbcd-set systemroot windows

Bcdedit-store C:bootbcd-set WinPE Yes

Bcdedit-store C:bootbcd-displayorder-addlast

Also, replace all of the above commands with the GUID generated in step 4th, and be sure to take {}.

Among them, the first to second order "Partition=e:" for the partition of WinPE, please modify according to the actual situation

Note: No matter which letter the WinPE go to, the WinPE is x after boot

After you reboot the system, you can see the following interface:

Appendix:

How to hide partitions

Open the registry, navigate to Hkcusoftwaremicrosoftwindowscurrentversionpoliciesexplorer, and create a new binary value on the right, named NoDrives, with the value set according to the following description:

Disk character

A

B

C

D

E

F

G

H

Numerical

01000000

02000000

04000000

08000000

10000000

20000000

40000000

80000000

Disk character

I

J

K

L

M

N

O

P

Numerical

00010000

00020000

00040000

00080000

00100000

00200000

00400000

00800000

Disk character

Q

R

S

T

U

V

W

X

Numerical

00000100

00000200

00000400

00000800

00001000

00002000

00004000

00008000

Disk character

Y

Z

All

Numerical

00000001

00000002

Ffffffff

Hide multiple partitions at the same time, you need to hide the values of the partition, the result is saved in hexadecimal, such as hidden D and e disk, nodrives value to 18 00 00 00 (08 00 00 00+10 00 00 00), other partition reference settings can

This modification is for the current user, and if it needs to be set up for all users to hide, navigate to the Hklmsoftwaremicrosoftwindowscurrentversionpoliciesexplorer to make changes.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.