The day-to-day maintenance of Windows XP is a time-consuming and tedious thing to do if Windows XP is smart enough to automate maintenance. Here, we introduce a technique for automatic maintenance of Windows XP through an. inf file, and the details of the automatic maintenance can be set arbitrarily, but require a command to implement. For example, use xcopy for file backup, defrag disk defragmentation, del Delete junk files, and so on. To clarify the principle, let's take defrag as an example, you can make changes according to your own needs.
Implementation steps
1. Establishment of Main.bat documents
Log on to Windows XP as an administrator, and in the root directory of the system disk, create a new file named Main.bat (file name can be arbitrarily taken, below) and enter the following:
CD \
C:
CD Windows\System32
Defrag C:/F
Chkntfs C:
2. Establishment of Main.inf documents
Create a new file with a file name of Main.inf and enter:
[Version]
Signature= "$CHICAGO $"
advancedinf= 2.5, "Advpack.dll"
[DefaultInstall]
Runpresetupcommands=tst.presetup
Runpostsetupcommands=tst.postsetup
[Tst.presetup]
C:\Main.bat
[Tst.postsetup]
C:\WINDOWS\SYSTEM32\TSSHUTDN. EXE 0/delay:0/PowerDown
In this file, signature must be set to "$CHICAGO $", otherwise the file will not work.