Summary of the invention
In view of the deficiencies of the prior art, the present invention provides a kind of data clearing method based on WinPE system, device, end
End and storage medium, to solve the above technical problems.
In a first aspect, the embodiment of the present application provides a kind of data clearing method based on WinPE system, the method packet
It includes:
Preparation system configuration file;
The Starting mode of WinPE system is set according to the configuration file;
Need to delete hard disk PE startup item according to user;
Data search and clear operation are executed using the registry file of WinPE system loads origin operation system.
With reference to first aspect, in the first embodiment of first aspect, the preparation system configuration file includes:
WinPE system file is stored to specified path;
The order line for preparing operating system controls program;
Generate the GUID character string of configuration startup item.
With reference to first aspect, described that WinPE system is arranged according to configuration file in second of embodiment of first aspect
The Starting mode of system includes:
Configuration calls configuration file and executes the first order perform script of BIOS Starting mode addition order;
Configuration calls configuration file and executes the second order perform script of UEFI Starting mode addition order;
Execute the first order perform script and the second order perform script.
With reference to first aspect, described to need to delete hard disk PE according to user in the third embodiment of first aspect
Startup item includes:
The GUID_SDI startup item of hard disk configuration file is deleted by bcdedit.exe delete command;
The GUID_WIM startup item of hard disk configuration file is deleted by bcdedit.exe delete command.
Second aspect, the embodiment of the present application provide a kind of data dump device based on WinPE system, described device packet
It includes:
Preparatory unit is configured to preparation system configuration file;
Setting unit is configured to that the Starting mode of WinPE system is arranged according to the configuration file;
Unit is deleted, is configured to need to delete hard disk PE startup item according to user;
Loading unit is configured to execute data search using the registry file of WinPE system loads origin operation system
And clear operation.
In conjunction with second aspect, in the first embodiment of second aspect, the preparatory unit includes:
File storage module is configured to store WinPE system file to specified path;
Program preparation module is configured to prepare the order line control program of operating system;
Character generation module is configured to generate the GUID character string of configuration startup item.
In conjunction with second aspect, in second of embodiment of second aspect, the setting unit includes:
First script module is configured to configuration and calls configuration file and execute the first of the addition order of BIOS Starting mode
Order perform script;
Second script module is configured to configuration and calls configuration file and execute the second of the addition order of UEFI Starting mode
Order perform script;
Script execution module is configured to carry out the first order perform script and the second order perform script.
In conjunction with second aspect, in the third embodiment of second aspect, the deletion unit includes:
First removing module is configured to the GUID_ that bcdedit.exe delete command deletes hard disk configuration file
SDI startup item;
Second removing module is configured to the GUID_ that bcdedit.exe delete command deletes hard disk configuration file
WIM startup item.
The third aspect provides a kind of terminal, comprising:
Processor, memory, wherein
The memory is used to store computer program,
The processor from memory for calling and running the computer program, so that terminal executes above-mentioned terminal
Method.
Fourth aspect provides a kind of computer storage medium, instruction is stored in the computer readable storage medium,
When run on a computer, so that computer executes method described in above-mentioned various aspects.
5th aspect, provides a kind of computer program product comprising instruction, when run on a computer, so that
Computer executes method described in above-mentioned various aspects.
The beneficial effects of the present invention are,
Data clearing method based on WinPE system, device, terminal and storage medium provided by the invention, pass through preparation
Simultaneously Starting mode is arranged in configuration file, realize encapsulation production hard disk version WinPE system, can a key addition, delete WinPE system open
Dynamic item executes data search and clear operation using the registry file of WinPE system loads origin operation system, reduces manpower object
The waste of power improves working efficiency.
In addition, design principle of the present invention is reliable, structure is simple, has very extensive application prospect.
Specific embodiment
Technical solution in order to enable those skilled in the art to better understand the present invention, below in conjunction with of the invention real
The attached drawing in example is applied, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described implementation
Example is only a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, this field is common
Technical staff's every other embodiment obtained without making creative work, all should belong to protection of the present invention
Range.
The Key Term occurred in the application is explained below.
Fig. 1 is the schematic flow chart of the method for the application one embodiment.Wherein, Fig. 1 executing subject can be one kind
Data dump device based on WinPE system.
As shown in Figure 1, this method 100 includes:
Step 110, preparation system configuration file;
Step 120, the Starting mode of WinPE system is set according to the configuration file;
Step 130, hard disk PE startup item is deleted;
Step 140, it executes data search using the registry file of WinPE system loads origin operation system and removes and grasp
Make.
Optionally, as the application one embodiment, the preparation system configuration file includes:
WinPE system file is stored to specified path;
The order line for preparing operating system controls program;
Generate the GUID character string of configuration startup item.
Optionally, as the application one embodiment, the Starting mode packet that WinPE system is arranged according to configuration file
It includes:
Configuration calls configuration file and executes the first order perform script of BIOS Starting mode addition order;
Configuration calls configuration file and executes the second order perform script of UEFI Starting mode addition order;
Execute the first order perform script and the second order perform script.
Optionally, described to need to delete hard disk PE startup item according to user and include: as the application one embodiment
The GUID_SDI startup item of hard disk configuration file is deleted by bcdedit.exe delete command;
The GUID_WIM startup item of hard disk configuration file is deleted by bcdedit.exe delete command.
In order to facilitate the understanding of the present invention, below with the present invention is based on the principle of the data clearing method of WinPE system,
Installation is configured WinPE system and is removed the process of origin operation system data using WinPE system in conjunction with the embodiments, to the present invention
The data clearing method based on WinPE system provided is further described.
The hard disk version PE to be realized starting, needs WinPE system file to be copied or is installed under some path of disk,
And the relevant configuration information of WinPE system is registered in origin operation system with specific mode.It herein can be by WinPE system
Simply it is understood as " micro-kernel " Windows system version.WinPE is configured in original system and starts information, is equal to
Increase a Windows system startup item on original system boot entry.It is more in operating system selection interface after system reboot
A guidance entry into WinPE system out.After selection enters WinPE, computer will be according to previous configured guidance
Information loads the WinPE file in disk, hence into WinPE system.
Very widely used today Windows operating system version has: Windows XP, 7 Windows, Windows 8,
Windows 10.To realize multiple operating system boot function, every kind of Windows operation can be configured using specific data information
Multiple operating system boot.Wherein Windows XP configures multisystem startup item using BOOT.INI file.Windows 7/8/10 is adopted
Multisystem startup item is configured with BCD file.
The present invention can modify BCD file by a key, increase hard disk version WinPE on 7/8/10 system of Windows and open
Dynamic item configuration, realization enter PE environment after restarting, carry out the purpose of data dump.
Computer starting mode is broadly divided into two kinds of BIOS, UEFI at present.The present invention can support simultaneously under both modes
Add hard disk version PE system startup item.
Specifically, the data clearing method based on WinPE system includes:
S1, preparation system configuration file.
What it is firstly the need of preparation is a customized encapsulation or Microsoft publication WinPE environment.Such as in the present invention
Use kernel version for the WinPE system of 6.0 (corresponding 10 kernel versions of Windows), including BOOT.WIM, BOOT.SDI,
Tri- files of BCD.The WinPE supports BIOS, UEFI both of which to start simultaneously.By All Files copy to C: under root.
Bcdedit.exe is also needed simultaneously.This program is the program carried in Windows7 and its system above, is one
A order line controls program, can be used to modify to system BCD file.
It needs to generate two GUID character strings, can be used when configuring startup item, be used to two data of unique identification
Object.GUID format is as follows:
{ 3C6342CE-A8F2-4c64-BE71-B19378E4E4FB }, writes for convenience below, is replaced with GUID_SDI.
{ B44DEC26-86B7-4257-A224-6FED6F315ED4 }, writes for convenience below, is replaced with GUID_WIM.
S2, the Starting mode that WinPE system is set according to the configuration file.
(1) WinPE of BIOS Starting mode is supported in addition
Program or batch processing can be write and successively run following instruction, by writing order perform script in the present embodiment
It successively executes to issue orders:
1. creating the virtual memory equipment of entitled GUID_SDI
bcdedit.exe/create GUID_SDI/device
2. setting subregion where GUID_SDI virtual memory device file
Bcdedit.exe/set GUID_SDI ramdisksdidevice partition=C:
3. setting GUID_SDI virtual memory device file path
bcdedit.exe/set GUID_SDI ramdisksdipath BOOT.SDI
4. creating the mapped device of entitled GUID_WIM, specified type OSLOADER
bcdedit.exe/create GUID_WIM/d"WinPE"/application OSLOADER
5. setting subregion where GUID_WIM mapped device file
Bcdedit.exe/set GUID_WIM device partition=C:
6. setting subregion where GUID_WIM image file system equipment
Bcdedit.exe/set GUID_WIM osdevice partition=C:
7. setting GUID_WIM image file system root
bcdedit.exe/set GUID_WIM systemroot\windows
8. setting the display order of GUID_WIM image file
bcdedit.exe/displayorder GUID_WIM/addlast
9. setting GUID_WIM image file listening functions to open
bcdedit.exe/set GUID_WIM detecthal yes
10. setting GUID_WIM image file type as winpe
bcdedit.exe/set GUID_WIM winpe yes
11. setting GUID_WIM image file ems function to close
bcdedit.exe/ems GUID_WIM OFF
12. setting path and the virtual memory implementor name of GUID_WIM image file
Bcdedit.exe/set GUID_WIM device ramdisk=[C :] BOOT.WIM, GUID_SDI
13. setting system equipment path and the virtual memory implementor name of GUID_WIM image file
Bcdedit.exe/set GUID_WIM osdevice ramdisk=[C :] BOOT.WIM, GUID_SDI
14. setting system default startup item
bcdedit.exe/default GUID_WIM
15. setting Bootloader file path
bcdedit.exe/set GUID_WIM path\Windows\System32\Boot\winload.exe
(2) WinPE of UEFI Starting mode is supported in addition
Program or batch processing can be write and successively run following instruction, by writing order perform script in the present embodiment
It successively executes to issue orders:
1. creating the virtual memory equipment of entitled GUID_SDI
bcdedit.exe/create GUID_SDI/device
2. setting subregion where GUID_SDI virtual memory device file
Bcdedit.exe/set GUID_SDI ramdisksdidevice partition=C:
3. setting GUID_SDI virtual memory device file path
bcdedit.exe/set GUID_SDI ramdisksdipath BOOT.SDI
4. creating the mapped device of entitled GUID_WIM, specified type OSLOADER
bcdedit.exe/create GUID_WIM/d"WinPE"/application OSLOADER
5. setting subregion where GUID_WIM mapped device file
Bcdedit.exe/set GUID_WIM device partition=C:
6. setting subregion where GUID_WIM image file system equipment
Bcdedit.exe/set GUID_WIM osdevice partition=C:
7. setting GUID_WIM image file system root
bcdedit.exe/set GUID_WIM systemroot\windows
8. setting the display order of GUID_WIM image file
bcdedit.exe/displayorder GUID_WIM/addlast
9. setting GUID_WIM image file listening functions to open
bcdedit.exe/set GUID_WIM detecthal yes
10. setting GUID_WIM image file type as winpe
bcdedit.exe/set GUID_WIM winpe yes
11. setting GUID_WIM image file ems function to close
bcdedit.exe/ems GUID_WIM OFF
12. setting path and the virtual memory implementor name of GUID_WIM image file
Bcdedit.exe/set GUID_WIM device ramdisk=[C :] BOOT.WIM, GUID_SDI
13. setting system equipment path and the virtual memory implementor name of GUID_WIM image file
Bcdedit.exe/setGUID_WIM osdevice ramdisk=[C :] BOOT.WIM, GUID_SDI
14. setting system default startup item
bcdedit.exe/default GUID_WIM
15. setting Bootloader file path
bcdedit.exe/set GUID_WIM path\windows\system32\boot\winload.efi
Hard disk PE startup item major part operating procedure is arranged under BIOS and UEFI mode to be just as, only distinguishes last
A line under BIOS mode, needs the path of specified starting guidance exe.And under UEFI start-up mode, need specified guidance efi text
The path of part.
S3, need to delete hard disk PE startup item according to user.
Program or batch processing can be write and successively run following instruction:
bcdedit.exe/delete GUID_SDI/cleanup;
bcdedit.exe/delete GUID_WIM/cleanup。
S4, data search and clear operation are executed using the registry file of WinPE system loads origin operation system.
System is restarted in setting immediately, will have more newly added " WinPE " selection entry at Systematic selection interface.Default into
Enter in WinPE environment, so as to operation data removing.For example, can manual carry original system registry file, can be light
Lookup and delete data.Or operation data cleanout tool, it is automatic to carry out data erasing.
If Fig. 2 shows, which includes:
Preparatory unit 210, the preparatory unit 210 are used for preparation system configuration file;
Setting unit 220, the setting unit 220 are used to be arranged according to the configuration file starting side of WinPE system
Formula;
Unit 230 is deleted, the deletion unit 230 is used to need to delete hard disk PE startup item according to user;
Loading unit 240, the loading unit 240 are used for the registration table text using WinPE system loads origin operation system
Part executes data search and clear operation.
Optionally, as the application one embodiment, the preparatory unit includes:
File storage module is configured to store WinPE system file to specified path;
Program preparation module is configured to prepare the order line control program of operating system;
Character generation module is configured to generate the GUID character string of configuration startup item.
Optionally, as the application one embodiment, the setting unit includes:
First script module is configured to configuration and calls configuration file and execute the first of the addition order of BIOS Starting mode
Order perform script;
Second script module is configured to configuration and calls configuration file and execute the second of the addition order of UEFI Starting mode
Order perform script;
Script execution module is configured to carry out the first order perform script and the second order perform script.
Optionally, as the application one embodiment, the deletion unit includes:
First removing module is configured to the GUID_ that bcdedit.exe delete command deletes hard disk configuration file
SDI startup item;
Second removing module is configured to the GUID_ that bcdedit.exe delete command deletes hard disk configuration file
WIM startup item.
Fig. 3 is a kind of structural schematic diagram of terminal installation 300 provided in an embodiment of the present invention, which can be with
For executing the data clearing method provided by the embodiments of the present application based on WinPE system.
Wherein, which may include: processor 310, memory 320 and communication unit 330.These components
It is communicated by one or more bus, it will be understood by those skilled in the art that the structure of server shown in figure is not
The restriction to the application is constituted, it is also possible to hub-and-spoke configuration either busbar network, can also include more than illustrating
Or less component, perhaps combine certain components or different component layouts.
Wherein, which can be used for executing instruction for storage processor 310, and memory 320 can be by any class
The volatibility or non-volatile memories terminal or their combination of type are realized, such as static random access memory (SRAM), electricity
Erasable Programmable Read Only Memory EPROM (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory
(PROM), read-only memory (ROM), magnetic memory, flash memory, disk or CD.When executing instruction in memory 320
When being executed by processor 310, so that terminal 300 some or all of is able to carry out in following above method embodiment step.
Processor 310 is the control centre for storing terminal, utilizes each of various interfaces and the entire electric terminal of connection
A part by running or execute the software program and/or module that are stored in memory 320, and calls and is stored in storage
Data in device, to execute the various functions and/or processing data of electric terminal.The processor can be by integrated circuit
(Integrated Circuit, abbreviation IC) composition, such as the IC that can be encapsulated by single are formed, can also be by more of connection
The encapsulation IC of identical function or different function and form.For example, processor 310 can only include central processing unit
(Central Processing Unit, abbreviation CPU).In the application embodiment, CPU can be single operation core, can also
To include multioperation core.
Communication unit 330, for establishing communication channel, so that the storage terminal be allow to be led to other terminals
Letter.It receives the user data of other terminals transmission or sends user data to other terminals.
The application also provides a kind of computer storage medium, wherein the computer storage medium can be stored with program, the journey
Sequence may include step some or all of in each embodiment provided by the present application when executing.The storage medium can for magnetic disk,
CD, read-only memory (English: read-only memory, referred to as: ROM) or random access memory (English:
Random access memory, referred to as: RAM) etc..
Therefore, the application realizes encapsulation production hard disk version WinPE system by preparing configuration file and Starting mode being arranged
System, can a key addition, delete WinPE system startup item, utilize WinPE system loads origin operation system registry file execute
Data search and clear operation reduce the waste of manpower and material resources, improve working efficiency, the attainable technical effect of the present embodiment institute
It may refer to described above, details are not described herein again.
It is required that those skilled in the art can be understood that the technology in the embodiment of the present application can add by software
The mode of general hardware platform realize.Based on this understanding, the technical solution in the embodiment of the present application substantially or
Say that the part that contributes to existing technology can be embodied in the form of software products, which is stored in
Such as USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory in one storage medium
The various media that can store program code such as (RAM, Random Access Memory), magnetic or disk, including it is several
Instruction is used so that a terminal (can be personal computer, server or second terminal, the network terminal etc.) is held
Row all or part of the steps of the method according to each embodiment of the present invention.
Same and similar part may refer to each other between each embodiment in this specification.Implement especially for terminal
For example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring in embodiment of the method
Explanation.
In several embodiments provided herein, it should be understood that disclosed systems, devices and methods, it can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit
It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
Although by reference to attached drawing and combining the mode of preferred embodiment to the present invention have been described in detail, the present invention
It is not limited to this.Without departing from the spirit and substance of the premise in the present invention, those of ordinary skill in the art can be to the present invention
Embodiment carry out various equivalent modifications or substitutions, and these modifications or substitutions all should in covering scope of the invention/appoint
What those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, answer
It is included within the scope of the present invention.Therefore, protection scope of the present invention is answered described is with scope of protection of the claims
It is quasi-.