Encapsulate Windows 7 Operating System

Source: Internet
Author: User

 

I. Preparations before Encapsulation

 

1. For the installation CD (image) officially released by Windows 7, see download the original official version of Windows 7 official retail edition.

2. Various Applications that need to be pre-installed, such as Office/WPS, Photoshop, and Win7 optimization masters. Of course, as a support for soft media, flash game browsers and cool points are also added.

3. UltraISO and Windows7 AIK. The Simplified Chinese version of Windows 7 AIK is:

Http://download.microsoft.com/download/6/3/1/631A7F90-E5CE-43AA-AB05-EA82AEAA402A/KB3AIK_CN.iso

4. WindowsPE disc (preferably a Windows7PE disc ). You can use Windows7AIK to create a Windows 7pe disc or download it from the following address:

Http://www.BKJIA reminds you, please do not spam advertising! /Zh-cn/files/709d244c-2e5a-11de-a413-0019d11a795f/

 

Ii. Install the operating system and applications

 

1. Install Windows 7.

There are four steps to install the operating system:

① It is best to install the operating system on the C drive. During the installation period (including installing and encapsulating Applications later), it is best not to connect to the network.

② If the serial number is entered during the installation of the operating system, the system will not be prompted to enter the serial number after encapsulation and re-installation of the operating system. Unless you want to create an OEM version of the packaging system, do not enter the serial number when prompted during installation. Click "Next" to continue system installation.

③ To keep the encapsulation system pure, do not install hardware drivers after the Windows 7 operating system is installed. Of course, installing the driver will not affect the system encapsulation.

④ In order to avoid unnecessary errors and generate error report files during system adjustment and optimization, installation of application software, UAC should be disabled and error reports should be disabled after the first entry into the system. Disable UAC and Disable Error Reporting as follows:

-- Open "Control Panel", click "system and security", select "operation center", and click "security ", in the detailed settings, find and click "select your UAC level" under "User Account Control". In the displayed dialog box, adjust the slider on the left to "never notice ", click "OK" to disable UAC (you need to restart the system to take effect ).

 

 

-- Next, click "maintain". In the detailed settings, find and click "set" under "check solution for problem report ", on the displayed page, select "never check solution (not recommended)" and click "OK" to disable error reports.

 

2. install various applications to be encapsulated.

Note that the capacity of a normal DVD disk is 4.37 GB. To avoid the possibility of burning the generated encapsulated file to a DVD disk, you must control the capacity of the system disk when installing the application. In general, make sure that the system disk does not occupy more than 8.5 GB of space after the hibernation files (hiberfil. sys) and page files (pagefile. sys) are removed. Again, I hope you can install the Win7 optimizer, Rubik's cube, and the flash game browser, which is the most suitable browser for Win7 :)

3. adjust and optimize the system and installed applications based on your preferences, and clean up temporary files, junk files, and registries of the system.

Here, we should pay attention to the problems that may cause system instability after adjustment and optimization and cleaning. We must have a comprehensive understanding of Win7 optimization masters, cube, and projects for adjustment and optimization and cleaning. Do not bring unstable factors to the system by adjusting, optimizing, and cleaning, and bring these unstable factors to the new system after encapsulation. For example, the small editor will first choose to use the cube to slim down the system.

3. Encapsulation

 

1. Enable the Administrator account and disable the currently used Administrator account.

① Right-click "computer" and click "manage". The "Computer Management" page is displayed. In the left-side pane of the "Computer Management" interface, double-click "local users and groups" and click "users". The middle pane of the "Computer Management" interface displays all user accounts in the computer, the name is the same as the user name entered during system installation.

 

② Right-click the Administrator user icon and click "properties". In the pop-up Administrator Properties dialog box, check "Account Disabled" and click "OK" to enable the Administrator user account.

 

③ Right-click the currently in use administrator user icon and click "properties". In the displayed "currently in use administrator user properties" dialog box, select "Account Disabled ", click "OK" to disable the currently used administrator account.

④ Enable the Administrator user account and disable the currently used Administrator user account, restart the computer, and the system will automatically use the Administrator user account to log on.

2. Convert the original system and application settings to the default settings for all users (that is, each new user account created in the future, you can directly use the settings of the user account you just disabled on the system and applications ).

① Open "Control Panel", click "appearance and personalization", find and click "show hidden files and folders" under "Folder Options ", in the pop-up "Folder Options" dialog box, remove the check box before "Hide protected operating system files (recommended)", and then select "show hidden files and folders ", click "OK" to display all files and folders on the computer.

 

② Open the user folder C: \ Users on the system disk and you can see the folder corresponding to each user account.

 

③ Set the "AppData" folder and NTUSER in the folder (Maker) of the user account that has just been disabled. DAT, ntuser. dat. LOG1, ntuser. dat. LOG2, NTUSER. DAT {xxxxxxxx-xxxx-xxxxxxxxxxxx }. TM. blf, NTUSER. DAT {xxxxxxxx-xxxx-xxxxxxxxxxxx }. tmcontainer1_000000000001.regtrans-ms, NTUSER. DAT {xxxxxxxx-xxxx-xxxxxxxxxxxx }. tmcontainer1_000000000002.regtrans-ms, ntuser. ini (if SciTE. sessio, global abbreviation. properties files must also be selected.) copy to the default user's folder (C: \ Users \ Default), if a file or folder with the same name is prompted during the copy process, click "OK" to overwrite or merge.

 

3. Delete the original user account (that is, the user account that has just been disabled) and its configuration folder.

① Right-click "computer" and click "manage". The "Computer Management" page is displayed. On the "Computer Management" Page, double-click "local user and group" in the left pane, and then click "user ", in the middle pane of the "Computer Management" interface, find the original user account (that is, the user account that has just been disabled), right-click the user icon, and click "delete ".

 

② Exit the "Computer Management" interface, right-click "computer", click "properties", and then click "Advanced System settings ", in the displayed "System Properties" dialog box, switch to the "advanced" tab and click "Settings" in the "user configuration file" box. The "user configuration file" dialog box appears, here we can see three user configuration files (one is the Administrator configuration file, one default configuration file, and one is shown as an unknown account ), an unknown account is the user account you just deleted. Just delete its configuration file: Select "unknown account", click "delete", and click "OK" to exit.

 

Next, open "computer", in the user folder C: \ Users that opens the system disk, and check whether the configuration folder of the deleted user account has been completely deleted, if there is a configuration folder in the user folder that has just been deleted from the user account, delete the folder. Then, in "Folder Options", set "show hidden files and folders" to the default value.

If a virtual optical drive software is installed, you need to run the virtual optical drive software and set the number of virtual optical drives to 0 to avoid Drive drive errors when the virtual optical drive is installed in the future.

If UAC is disabled or error report is disabled, enable UAC and enable error report.

4. Execute encapsulation.

① Open "computer", find and run sysprep.exe in the C: \ Windows \ System32 \ sysprepdirectory, and select "Enter system experience (OOBE)" under "system cleanup operations )", select "General", select "shutdown" in "shutdown options", and click "OK" to start encapsulation.

 

② It takes 1-2 minutes to encapsulate the entire process. do not perform other operations during this period. After the encapsulation is completed, the computer will automatically shut down.

 

4. Create an encapsulated System Image

 

After the encapsulation is executed, you need to use Ghost or ImageX to create the encapsulation system image. Ghost and Imagex have their own advantages and disadvantages: The maximum compression time of Ghost is shorter than that of Imagex, And the restoration (installation) time is much faster than that of Imagex, however, the generated backup file is large, and the customization is not strong. You cannot add third-party drivers or upgrade patches. Although Imagex has a long backup time and a relatively long backup (installation) Time, however, the generated image file is small, and you can add third-party drivers, upgrade patches, and so on, with strong customization.

1. Use Ghost to create an encapsulated image.

The process of using ghostto create a mirror is relatively simple. You can use a windowspeoptical disk (not necessarily after windows7pe.pdf starts the computer, run ghost32.exe to make the system partition into a *. GHO file. When creating an image file, it is best to add the split and z parameters to enable maximum compression and split the image file. For example, Run "ghost32-span-split = 2000-z9". When creating an image, Ghost enables best compression and splits the image file into 2000 MB.

After creating an encapsulated image, you only need to restore the encapsulated image to install the system on another computer.

2. Use Imagex to create an encapsulated image.

① If imagex.exeis not used for windowspeech, copy imagex.exe (preferably 6.1.7600.16385) to the USB flash disk.

② Run the following command to create the encapsulated system image:

Imagex/compress maximum/check/scroll/capture X: Y: \ install. wim "Windows 7 Ultimate"

Where:/compress maximum indicates that the maximum compression is enabled;/check indicates that the wim file integrity is checked;/scroll indicates that the output to be redirected is rolled;/capture X: the partition of the operating system where the image is to be captured; Y: \ install. wim indicates the location and file name of the image file. "Windows 7 Ultimate" indicates adding instructions to the wim file for viewing. The content in double quotation marks can be set according to your preferences. For example, if the operating system is installed on disk D and you want to create an encapsulated image file to the root directory of disk E and name it install. wim, run the following command:

Imagex/compress maximum/check/scroll/capture D: E: \ install. wim "Windows 7 Ultimate"

 

After the command is run, imagex.exe scans the files and folders in the operating system partition and starts to capture the files. After the capture is complete, the command window prompts "successfully". Close the command window and exit the WindowsPE system to restart the computer.

 

After the computer restarts, it will immediately enter the reinstallation status, initialize the system, update the registry, and install the driver. In this process, we can check the encapsulation problems.

3. Create an installation disc for the encapsulation system.

If there is no problem with the packaging system, you can use the image file created by Imagex to create the packaging system installation disk.

① Install Windows7AIK. Find and run "Windows system image manager" in the Start Menu. On the "Files" menu, click "select Windows Image". The "select Windows Image" dialog box appears, select the previously created install. to create a wim file, click "open". A dialog box for creating a file catalog file is displayed. Click "yes" to create a catalog file.

 

After creating the directory file, a clg file will appear in the directory where install. wim is located.

 

② Install UltraISO. Use UltraISO to open the original Windows 7 CD image, find install. wim and five intall_Windows 7 *****. clg files in the sources directory of the CD image, and delete them all.

 

③ Install it by yourself. add wim and the generated directory file to the sources directory of the CD image, and click "save" (do not select "Save as") to complete the preparation of the encapsulated system CD image.

 

At this point, the Windows 7 encapsulation system is basically complete!

5. Make the encapsulation system more perfect

 

After the encapsulation system is created according to the previous steps, although the system functions and pre-installed applications can be installed on other computers, there are still a few imperfections:

-- A black screen may appear when you log on to the system for the first time. You need to reset the desktop background.

-- After running the pre-installed application, you can find that the folder of the user account that has been deleted has been regenerated in the user folder.

-- Run the Registry Editor to find "Users \ <deleted username>" (for example, "Users \ Maker "), I found many registry projects for "Users \ <deleted username>.

 

1. solution 1: change all "Users \ <deleted username>" registry project to "Users \ Default" and import it to the system before the first logon.

① Search for the Registry file. Use your own encapsulated System for installation. After logging on to the system, run regedit.exe in the C: \ widowsdirectory directory to open the Registry Editor, click "edit", and then click "Search ", in the "Search" dialog box, enter "Users \ <deleted username>" (for example, Users \ Maker) and click "Search next" to start searching.

 

② Export the Registry file. When you find a registry project that contains the "Users \ <deleted username>" field, click "File ", click "Export" to export the registry project to the hard disk (save as the reg file ).

 

Press the F3 key to continue searching and export the registry key that contains the "Users \ <deleted username>" field, always find the end of HKEY_LOCAL_MACHINE (ignore the registry key found after HKEY_USERS ).

 

After the search and export are complete, close the Registry Editor and go to the directory where the exported registry is located. You can see all the exported registry items (the pre-installed application software is different, the number of exported registry files is also different ).

 

③ Merge the Registry file. Find and run notepad in "Start Menu"-"attachment", enter "Windows Registry Editor Version 5.00" in the first line, right-click one of the Registry files, in the pop-up menu, click "edit" to open the Registry file and set the key name (that is, the field with brackets) in the Registry file) copy the project with the "Users \ <deleted username>" field to notepad. Open another registry file and copy the key name and project containing the "Users \ <deleted username>" field to notepad in the same way, the key names of all exported registry files and projects that contain the "Users \ <deleted username>" field are copied to notepad.

 

Be very careful in this process, and be good at using the "Search" function of notepad. Make sure that every registry project can be correctly copied to notepad. After the review, you are advised to review it again.

④ Replace the registry project. On the notepad menu bar, click "edit" and then "replace". In the displayed dialog box, enter the deleted user name, and enter "Default" in "Replace ", click "replace all ".

 

⑤ Save the Registry file. On the notepad menu bar, click "file" and then "Save as". In the "Save as" dialog box that appears, select the location to save and select "all files" for "Save type ", enter the file name in "file name" (remember to add the reg extension), and click "save" to exit notepad.

 

6. Create a script file. Open notepad, enter the following content, and save it as oobe. cmd and system. cmd files respectively:

@ Echo off

Regedit/s % systemroot % \ setup \ scripts \ fix. reg

Rmdir/s/q % systemroot % \ setup \ scripts

Here, fix. reg is the Registry file saved in the previous step, which can be modified according to your actual situation. The content of oobe. cmd and system. cmd are the same. Remember to select "Save type" as "all files" when saving ".

 

7. Modify the encapsulated system image. Create a folder named $ oem $ and a folder named $ in the $ oem $ folder, then, create a folder named setup in the $ folder, and create a folder named scripts in the setup folder (the final directory structure of the $ oem $ folder is: \ $ oem $ \ setup \ scripts ). Copy the saved registry files (fix. reg), oobe. cmd, and system. cmd to the \ $ oem $ \ setup \ scripts directory.

 

Use UltraISO to open the encapsulated system image, add the $ oem $ folder to the sources directory of the CD image, and click "save" to exit.

 

The modified encapsulated system CD image is created.

2. solution 2: Use programming tools to compile a program that automatically modifies the registry, when you log on to the system for the first time, change all the "Users \ <deleted username>" registry project to "Users \ <new username> ".

Programming basics are required for compiling a program that automatically modifies the registry and changes the "Users \ <deleted username>" registry project to "Users \ <new username>, this article does not describe how to compile this program. If you have a programming Foundation, You can compile and compile the program into an executable program based on your actual needs. Here we will introduce how to automatically modify the registration table program when the system runs for the first time (if this is false, the registration table program name is fix.exe ).

① Open notepad, enter the following content, and save it as the runonce. reg registry file:

Windows Registry Editor Version 5.00

 

[HKEY_CURRENT_USER \ Control Panel \ Desktop]

"Wallpaper" = "C: \ Users \ Default \ AppData \ Roaming \ Microsoft \ Windows \ Themes \ TranscodedWallpaper.jpg"

[HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ RunOnce]

"Fix" = "C: \ Windows \ Setup \ scripts \ fix.exe"

 

② Open notepad, enter the following content, and save it as the oobe. cmd and system. cmd files respectively:

@ Echo off

Regedit/s % systemroot % \ setup \ scripts \ runonce. reg

 

③ Create a folder named $ oem $ and create another folder named $ in the $ oem $ folder, then, create a folder named setup in the $ folder, and create a folder named scripts in the setup folder (the final directory structure of the $ oem $ folder is: \ $ oem $ \ setup \ scripts ). Copy fix.exe, runonce. reg, oobe. cmd, and system. cmd to the \ $ oem $ \ setup \ scripts directory. Use UltraISO to open the encapsulated system image, add the $ oem $ folder to the disk image sources directory, and click "save" to save the image file.

Here, the whole process of making the Windows 7 encapsulation system is completely described. Of course, what this article introduces is not the only way to create a Windows 7 encapsulation system. We need to learn and study more and better methods, approaches, and techniques. As long as you learn more and practice more, you will be able to make a more perfect packaging system!

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.