good

Thursday, July 30, 2009

auto delete temp when start

Since many viruses are using the user's temporary folder, hidden inside a number of virus programs. Let me recently met.

Therefore, for a group trying to deal with their own document, and then the machine starts to run loaded directly to the temporary folder of documents removed.

I will own the system temporary folder on the disk drive other than D. Set as follows:

1,

Right-click My Computer -> Properties -> Advanced -> Environment Variables in the User Variables, select TEMP and editing, variable name will be changed to a directory on D disk. And to identify. It is desirable also to TMP was changed to the variable the same directory of D drive. Here I was on the D: \ Temp \ Temp on.

2,

Using Notepad to edit a text file, which reads as follows:

rmdir "D: \ Temp \ Temp" / s / q

md "D: \ Temp \ Temp"

Save, and then it changed its name to DelTemp.bat, (of course, not the name, the place is not the location of a location), but must remember to name it the suffix. Bat. The contents of the path can be set up temporary files and change the storage location.

3,

Click "Start -> Run", type "gpedit.msc" (without the quotation marks) Return to open "Group Policy Editor" in the left branch of the tree and select "Computer Configuration -> Windows Settings -- > Scripts (Startup / Shutdown) ", double-click the" Start ", in the" Start Attribute "window in the point" add ", the location of the script by browsing to find you have just saved the batch file DelTemp.bat and to determine, from the Group Policy. If you want to delete it in the write-off on the "user profile" to engage the local

After the next restart, the contents of the temporary folder will be cleared of a clean.

Of course, this batch can also be a quick link on the desktop, at any time to clean up can double-click the temporary folder to the clean-up.

No comments:

Post a Comment