Use the INF file to enable Windows XP for automatic maintenance [system scheduled tasks can be implemented]

Source: Internet
Author: User

Daily maintenance of Windows XP is a time-consuming and boring task. If Windows XP is smarter, it would be nice to perform automatic maintenance. Next, we will introduce you to the technique of enabling Windows XP to perform automatic maintenance through the. inf file. The specific content of automatic maintenance can be set at will, but it needs commands. For example, xcopy is used for file backup, defrag is used for disk fragmentation, and Del is used to delete junk files. In order to clarify the principle, we will take defrag as an example. You can modify it as needed.

Today's focus:
The second largest mobile phone agent in China, beestar International, with a huge loss of 0.8 billion million
Intel announced a plan to save $10500 in two years for 5 billion million layers
Sales from the computer city, hacker black screen, new computer installation, quick decommission "heart"


· Make men strong and women excited · Secret weapon that inspires women (figure)
· New product: making women inseparable from men · ★06 men-new kidney medicine !!

Steps

 

1. Create the main. BAT file

 

Log on to Windows XP as an administrator, create a file named main. bat under the root directory of the system disk (the file name can be obtained at will, the same below), and enter the following content:

 

CD/

 

C:

 

CD Windows/system32

 

Defrag C:/F

 

Chkntfs c:

 

2. Create the main. inf file

 

Create a file named main. inf and enter:

 

[Version]

 

Signature =/"$ Chicago $ /"

 

Advancedinf = 2.5,/"advpack. dll /"

 

[Defainstall install]

 

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.

 

3. Create the begin. BAT file

 

Create a batch processing file begin. bat under the C-drive root directory, and enter:

 

C:/Windows/system32/rundll32.exe advpack. dll, launchinfsectionex

 

C:/Main. inf, defaultinstall, 32

 

This command enables Windows XP to start a hardware Installation Process and execute commands in the. inf file. Rundll32.exe is used to call functions provided by DLL files (Dynamic Link Library) in windows. For example, rundll32.exe calls the launchinfsectionex function in advpack. DLL to start a. inf installation process. However, the content of Main. inf has nothing to do with hardware installation. Instead, we steal the bar and change it to the command automatically maintained by the system.

 

4. Schedule Tasks

 

Scheduled tasks are used to regularly execute the begin. BAT file. The implementation steps are as follows:

 

(1) Open the Start Menu of Windows XP and go to "program> attachment> System Tools> scheduled tasks". Double-click "add scheduled task" and click "Browse ", find begin under the C drive root directory. BAT file, and then click "Next" button /;

 

(2) set the task execution cycle to "Weekly", and click "Next /;

 

(3) set the password of the execution plan task, that is, the administrator password of the computer, and then click the "Next" button /;

 

(4) set the task execution date and time.

 

In the above example, we have this scheduled task execute file C:/begin. Bat every Sunday for automatic maintenance.

 

Implementation Principle

 

The. inf file is usually used for hardware installation. It is actually a text file. When you right-click a file and select "Install", Windows performs a series of operations based on the content of the file. INF file.

 

When a scheduled task is started, it calls begin. bat. Begin. bat will use main. inf as the configuration file to start an installation process and perform a series of operations according to the content in main. INF.

 

Main. when INF is started, [TST. the statement in the presetup] section, that is, "C:/main. bat ", Main. when Bat is called, Windows will perform disk fragmentation on C. The richer the content of Main. bat, the more powerful the automatic maintenance function is.

 

After all the commands in Main. Bat are executed, the statements in [TRS. postsetup] will be executed again, that is:

 

C:/Windows/system32/tsshutdn. EXE 0/delay: 0/powerdown

 

This statement is used to shut down the computer. In fact, it is used to "Turn off Windows XP + power off ".

 

Note that this method can only be implemented in Windows XP professionl, and Windows XP Home cannot be used.

 

Related Article

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.