Let Windows XP fully maintain the system
The daily maintenance of Windows XP is a time-consuming and boring thing, if Windows XP can be smarter It is good to carry out 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 clarify the principle, let's take Defrag as an example. You can modify it according to your needs. Implementation Step 1. Create the Main.bat file and log in to Windows XP as an administrator. Create a new file named Main.bat in the root directory of the system disk (the file name can be taken randomly, the same below) and enter the following content: cd\\ C: cd Windows\\system32 defrag C: /f chkntfs C: 2. Create a Main.inf file and 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:\\WINDOWS\\SYSTEM32\\TSSHUTDN.EXE 0 /DELAY:0 /POWERDOWN In this file, Signature must be set to ”$CHICAGO$” or the file will not work.
3. establish Begin.bat file creation batch file Begin.bat in the C root directory, enter into this file: C: \\ WINDOWS \\ System32 \\ rundll32.exe advpack .dll,LaunchINFSectionEx C:\\Main.inf,DefaultInstall,,32 The purpose of this command is to have Windows XP launch a hardware installation process to execute the instructions in the .inf file. Rundll32.exe is used in Windows to call functions provided by functions in DLL files (dynamic link libraries). For example, the rundll32.exe here calls the LaunchINFSectionEx function in advpack.dll. The function of this function is to start an .inf installation process. However, the content of Main.inf has not been related to hardware installation, but has been changed to a system automatic maintenance command by us. 4. The purpose of the scheduled mission planning task is to periodically execute the Begin.bat file. The implementation steps are as follows: (1) Open the Windows XP Start menu and go to “ Programs & Rarr; Attachments & Rarr; System Tools & Rarr; Plan Tasks & rdquo;, double-click “ Add a scheduled task”, click “Browse” to find the Begin.bat file under the root directory of the C drive, and then click the “Next” button; (2) Set the task execution period to “ Weekly&rdquo” ;, then click the "Next" button; (3) set the password for the execution of the scheduled task, which is the administrator password of the computer, and then click the "Next" button; (4) set the specific task Date and time. In the above example, we let the scheduled task execute the file C:\\Begin.bat at 23:30 every Sunday for automatic maintenance. Implementation principle The .inf file is usually used for hardware installation and is actually a text file. When the user right-clicks on the file and selects "Install", Windows will perform a series of operations based on the contents of this file. The automatic maintenance method described above is implemented by means of this feature of the .inf file. When the scheduled task we create starts, it calls Begin.bat. Begin.bat will use Main.inf as a configuration file to start an installation process and perform a series of operations in accordance with the contents of Main.inf. When Main.inf starts, it will first execute the statement in the [Tst.PreSetup] section, that is, "C:\\Main.bat", when Main.bat is called, Windows will perform defragmentation on C:. The richer the content of Main.bat, the more powerful the automatic maintenance function. After the commands in Main.bat are executed, the statements in [Trs.PostSetup] will be executed again, namely: C:\\WINDOWS\\SYSTEM32\\TSSHUTDN.EXE 0 /DELAY:0 /POWERDOWN The purpose of this statement is to close The computer is actually "turn off Windows XP + turn off the power". Last but not least, this method can only be implemented in Windows XP Professionl, Windows XP Home can not be used.
3. establish Begin.bat file creation batch file Begin.bat in the C root directory, enter into this file: C: \\ WINDOWS \\ System32 \\ rundll32 .exe advpack.dll,LaunchINFSectionEx C:\\Main.inf,DefaultInstall,,32 The purpose of this command is to have Windows XP launch a hardware installation process to execute the instructions in the .inf file. Rundll32.exe is used in Windows to call functions provided by functions in DLL files (dynamic link libraries). For example, the rundll32.exe here calls the LaunchINFSectionEx function in advpack.dll. The function of this function is to start an .inf installation process. However, the content of Main.inf has not been related to hardware installation, but has been changed to a system automatic maintenance command by us. 4. The purpose of the scheduled mission planning task is to periodically execute the Begin.bat file. The implementation steps are as follows: (1) Open the Windows XP Start menu and go to “ Programs & Rarr; Attachments & Rarr; System Tools & Rarr; Plan Tasks & rdquo;, double-click “ Add a scheduled task”, click “Browse” to find the Begin.bat file under the root directory of the C drive, and then click the “Next” button; (2) Set the task execution period to “ Weekly&rdquo” ;, then click the "Next" button; (3) set the password for the execution of the scheduled task, which is the administrator password of the computer, and then click the "Next" button; (4) set the specific task Date and time. In the above example, we let the scheduled task execute the file C:\\Begin.bat at 23:30 every Sunday for automatic maintenance. Implementation principle The .inf file is usually used for hardware installation and is actually a text file. When the user right-clicks on the file and selects "Install", Windows will perform a series of operations based on the contents of this file. The automatic maintenance method described above is implemented by means of this feature of the .inf file. When the scheduled task we create starts, it calls Begin.bat. Begin.bat will use Main.inf as a configuration file to start an installation process and perform a series of operations in accordance with the contents of Main.inf. When Main.inf starts, it will first execute the statement in the [Tst.PreSetup] section, that is, "C:\\Main.bat", when Main.bat is called, Windows will perform defragmentation on C:. The richer the content of Main.bat, the more powerful the automatic maintenance function. After the commands in Main.bat are executed, the statements in [Trs.PostSetup] will be executed again, namely: C:\\WINDOWS\\SYSTEM32\\TSSHUTDN.EXE 0 /DELAY:0 /POWERDOWN The purpose of this statement is to close The computer is actually "turn off Windows XP + turn off the power". Last but not least, this method can only be implemented in Windows XP Professionl, Windows XP Home can not be used.
Windows Home (www.Windowszj.com): DiskGenius is a practical partitioning tool when reinstalling the
In network management, configure the machine with the right network protocol, sometimes improving th
5, copy /move to If we want to copy (move) a file (folder), then, first of all to the file (folder
Windows system utilization mechanism of CPU In Windows system, each process is assigned a c
XP SP2 (RC2) uses the full Raiders
Automatically back up your favorites
The Group Policy Help Windows XP More Security
Solution to abnormal Windows XP system failure
"The memory can't be read or write" solution
Windows XP Broadband Application Tips
How to view the power-on shutdown record in WINXP?
Winkey: five combination buttons commonly used by experts
XP boot menu how much do you know (novice must read)
Windows XP SP3 official version of the fool installation diagram
Let Windows XP no longer prompt for driver signature
Teach you to change the windows xp operating system serial number
The difference between a common server cabinet and an advanced server cabinet
How can I solve the problem that Win8 Recycle Bin cannot put large files?
Win10 installation process Win10 technology preview installation graphic tutorial
Windows 10 Build 14366 opens to the slow channel
The program is forcibly closed! What should I do if the xp taskbar stops working?
Win7 system login 163 mailbox appears 0xc06d007e error solution
What is the reason that Win7 voice chat party can't hear their voice?
Win7 method for finding and deleting system update files
What if the Win7 microphone has no sound? The microphone has no sound solution