Use the logout script to clear the traces of Internet access

Source: Internet
Author: User

After surfing the Internet, the system always leaves a lot of garbage to be cleared, including temporary IE files, history records and Cookies. If you use manual cleanup every time, it is troublesome. In fact, you only need to use the shutdown and logout scripts of Windows 2000/XP to achieve automatic cleanup.

  Clear temporary IE files 

To speed up access, IE will store the web pages that have been browsed in the Temporary Internet Files folder. If we do not want others to look at their secrets from here, we can use the shutdown script to let the system automatically clean up before shutdown. Here we will introduce the specific operations (taking Windows XP as an example ).

In the "C: WindowsSystem32GroupPolicyMachineScriptsShutdown" directory, create a batch file Cleanup. bat, which can be written as needed. The command for clearing temporary IE Files is "DEL/Q/S" C: Documents and Settings <User Name> Local SettingsTemporary Internet Files "". The parameter/Q indicates that the quiet mode is used, that is, confirmation is not required when the global wildcard is deleted; the parameter/S indicates that the file is deleted from all subdirectories.

Click Start and run. In the run command box, enter Gpedit. msc to open the Group Policy window. In the left-side console tree, expand "Computer Configuration", "Windows Settings", and "script (start/stop)" Node (1 ), double-click the "shutdown" project in the details pane on the right. In the "shutdown properties" dialog box that appears, click "add" to Cleanup. bat is added as a new computer shutdown script. After setting, exit the Group Policy window and restart the computer.



Figure 1

  Clear Cookies

Cookies are small text files used to store information such as URLs, logon usernames, passwords or personal data, and identity recognition. Cookies make it easier for us to log on to some websites, but they also cause leakage of personal privacy. Therefore, it is necessary to promptly clean up Cookies on computers. In the Cleanup. bat batch file, add the "DEL/Q" C: Documents and Settings <User Name> Cookies "command to clear Cookies.

  Clear IE history 

The common method to clear IE history is "Internet Options", "General", and "Clear history ". However, we can also use the shutdown script to achieve automatic cleaning. Add a command "DEL/Q/S" C: Documents and Settings <username> Local SettingsHistory "to the Cleanup. bat batch file created earlier.

  Clear IE Address Bar records

The IE history records we cleared earlier are not thorough enough. When we enter a string that is the same as the previously entered URL in the IE Address Bar, the relevant URL records will still be displayed. To clear these records, you must delete all the key values under the [hkey current USERSoftwareMicrosoftInternet assumertypedurls] branch of the Registry.

Use NotePad to create a script file. The script content is as follows:

Dim WSHShell

Set WSHShell = WScript. CreateObject ("WScript. Shell ")

WSHShell. regWrite "HKCUSoftwareMicrosoftInternet assumertypedurls", "" WSHShell. regDelete "HKCUSoftwareMicrosoftInternet javasertypedurls" the preceding script has four sentences: the first clause defines a variable WSHShell, the second statement creates an object, and the third statement writes data to the Registry. If this item does not exist in the registry, an error message is displayed when the script is executed. Enter the preceding content and save it as Cleanup. vbs. Note that the suffix must be vbs to ensure normal execution of the script.

After compilation, expand the "user configuration", "Windows Settings", and "script (login/logout)" nodes in the Group Policy window, and double-click the "logout" project in the right pane, in the pop-up "logout attribute" dialog box, click "add" to Cleanup. add vbs as the logout script (2 ). In this way, the IE Address Bar records will be automatically cleared when the computer is logged out or shut down.



Figure 2

The previous section describes how to use the shutdown and logout scripts to automatically clear online traces. If you have other projects that need to be cleaned up, refer to the above method. Here, we should remind you that it is best to manually clean up the script once before it is automatically cleared.

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.