The method of WinPE the WIM program under the load

Source: Internet
Author: User
Tags exit goto

WinPE system CD-ROM, u disk and hard drive boot, its mounted WIM file has writable and non-writable mount two ways, if it is writable media can be launched to achieve writable mount (this article is not focused on). The disc is not writable, so you cannot write the Mount Wim file. Some software running time will produce some files, such as: Kill Soft, thunder and so on, if not writable words will be wrong. Now provides a way to completely solve such problems, the key to solve is to determine the WinPE system from that medium to boot? If the CD is started, it is not writable. This decision makes the startup program in the WIM file the best. The following example illustrates the processing method, assuming that the opera.wim contains two files, one opera.exe, another opera.cmd, and the key part is Opera.cmd, with the following code:

@echo off

COLOR 5f

For%%a in (y x W v u t s r q p o n m l k J I h G F E D C) do (

If exist%%a:minipeopera.wim (

If not exist%%a:minipeopera.wim (

fsutil fsinfo drivetype%%a:|findstr/i "CD" >nul&& (

Call:one

Exit) | | (

Call:two

Exit

)

)

)

: one

Echo.

The Echo startup program determines that this PE is a CD-ROM, and that the disc is not writable, so that the program starts properly.

Echo.

Echo. Please specify the partition where the file will run, and we will copy the file to the Peopera of your designated partition to

Echo.

Echo. The next time you can reduce this operation.

Echo. -------------------------------------------------------------------

Echo.

set/p tp= Please enter the run partition

Echo.

Echo.

Set tp=%tp:~0,1%

xcopy y:opera/e%tp%:p eopera/y/h/r>nul 2>nul

Attrib-r-a%tp%:p eopera/s/d

pushd%tp%:p Eopera

Start Operausb.exe

)

Goto:eof

: Two

Start Operausb.exe

Goto:eof

Description

1, first of all, When the user clicks to run Opera.wim, will start the inside of the Opera.cmd, by it to determine whether the WinPE system is on CD media to start running, if it is, then prompts the user to set a local partition, when the user specifies the local partition, this time, Opera.cmd will be required to copy the files to local points and run on the area. If you judge the WinPE system to run on writable media, run the program directly.

2, this judgment procedure needs to have Findstr.exe and fsutil.exe these two files, the general WinPE system kernel is not, these two files or put in the kernel, or put in the WIM file, but the proposal puts in the kernel, because there are many software need the same processing.

3, this method is applicable to ISO and IMG core WinPE system, also suitable for whether to open B disk.

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.