In-depth understanding of Windows XP automatic maintenance system function

  

Everyone will regularly clean up and maintain the computer, I do not know what methods are used by everyone, it is estimated to use the download optimization software to complete it, in fact, no need to do so Just use the features that come with the system. The routine maintenance of Windows XP is a time-consuming and boring thing. If Windows XP is smarter, it's fine to do automatic maintenance. Below, we will introduce a technique for automatic maintenance of Windows XP through .inf file. The specific content of automatic maintenance can be set arbitrarily, but it needs to be implemented by commands. For example, use Xcopy for file backup, Defrag for disk defragmentation, Del to delete junk files, and so on. In order to explain the principle clearly, let's take Defrag as an example. You can modify it according to your needs.

Implementation Steps

1. Create the Main.bat file

Log in to Windows XP as an administrator and create a new name called Main.bat in the root directory of the system disk. The file (the file name can be taken casually, the same below) and enter the following:

cd

C:

cd Windowssystem32

defrag C: /f

chkntfs C:

2. Create Main.inf file

Create a new file named Main.inf and type:

[version]

Signature= "$CHICAGO$"

AdvancedINF= 2.5,"advpack.dll"

[DefaultInstall]

RunPreSetupCommands=Tst. PreSetup

RunPostSetupCommands=Tst.PostSetup

[Tst.PreSetup]

C:Main.bat

[Tst.PostSetup]

C:WINDOWSSYSTEM32TSSHUTDN.EXE 0 /DELAY:0 /POWERDOWN

In this file, Signature must be set to ”$CHICAGO$” or the file will not work.

3. Create a Begin.bat file

Create a batch file Begin.bat in the root directory of the C drive, and type in this file:

C:WINDOWSSystem32 undll32. Exe advpack.dll,LaunchINFSectionEx

C:Main.inf,DefaultInstall,,32

Copyright © Windows knowledge All Rights Reserved