Magical scripts and batches to erase traces in a computer _dos/bat

Source: Internet
Author: User
We know that using the Windows operating system in your open file, enter a variety of passwords or chat with friends with QQ, may cause personal secrets leaks, will leave traces on the machine. For security reasons, if you're on a public computer, you should erase the traces left behind when you leave, and here are some possible leaks and solutions.

I. Possible leaks and the location of their existence

There are two places in windows that may leak our secrets: one exists in the folder, one is in the register.

1. Folder: In the "Start" menu in the "document" will display the files we have browsed, if they expose them, will make our secret is not guaranteed, should be deleted. The contents of the document are placed in the C:\Windows\Recent folder, the temporary files that are generated when you install the program, edit the file are placed in the C:\Windows\Temp folder, files are not actually deleted when you delete them, and they are saved in the Recycle Bin, and the things in the Recycle Bin are in the C:\ The recycled folder (implied) is stored; When you surf the web, WINDOWS will keep the pages you've seen in the C:\WINDOWS\History and C:\Windows\Temporary Internet Files folders; , Microsoft will also take cookies from the Internet to you, cookies in the C:\WINDOWS\Cookies.

2. In the registry: IE browser in the address bar left Zengjin to the website address and later born "network real name."

In fact, the Windows registry itself is a large garbage warehouse, the garbage in the inside, you have free time to find it. This article only points out one or two places to guide you analogy and how to clear the list of possible leaks in the registry.

We know that using the Windows operating system in your open file, enter a variety of passwords or chat with friends with QQ, may cause personal secrets leaks, will leave traces on the machine. For security reasons, if you're on a public computer, you should erase the traces left behind when you leave, and here are some possible leaks and solutions.

In fact, the Windows registry itself is a large garbage warehouse, the garbage in the inside, you have free time to find it. This article only points out one or two places to guide you analogy and how to clear the list of possible leaks in the registry.

Ii. Specific examples

Implementing this feature uses two files, VBS script file Reg.vbs (you can define your own file name), batch file Reg.bat (you can define your own file name).

The 1.VBS script files are as follows:

Dim WshShell

Set wshshell=wscript.createobject ("Wscript.Shell")

WshShell.RegWrite "Hklm\software\microsoft\windows\currentversion\run\reg", "Reg.vbs"

WshShell.RegWrite "Hklm\software\microsoft\windows\currentversion\runonce\deldel", "Reg.bat"

WshShell.RegWrite "HKCU\Software\Microsoft\Internet explorer\main\start Page", "About:blank"

WshShell.RegWrite "HKCU\Software\Microsoft\Internet explorer\typedurls\", ""

Wshshell.regdelete "HKCU\Software\Microsoft\Internet Explorer\typedurls\"

WshShell.RegWrite "HKCU\Software\Microsoft\Internet explorer\typedurls\", ""

WshShell.RegWrite "hkcu\software\3721\inputcns\", "" "

Wshshell.regdelete "Hkcu\software\3721\inputcns\"

WshShell.RegWrite "hkcu\software\3721\inputcns\", "" "

The first two behavior of this script defines variables, please write them. Starting with the third line is the processing of the registry. The third row, the fourth act in the registry adds a process file that is automatically run when the computer starts up, one for the script itself, and the other for the Reg.bat batch file (reg.vbs). The act of reducing the IE start page as "About:blank"; 第六、七、八 behavior clears the address bar of IE browser has been visited by the Web page address name, 第九、十、十 line to clear IE address bar of the network real names.

Here, readers need to master the following points:

1 Here we take advantage of the VBS scripting language, where VBScript code is interpreted locally by Windows Script Host. The implementation of VBS is inseparable from Windows Script Host (WSH), WSH is a language-independent script interpretation mechanism provided by Microsoft based on the 32-bit Windows platform, which enables scripts to run directly from the Windows desktop or at the command prompt. With WSH, users can manipulate WSH objects, ActiveX objects, registries, and file systems. Under Windows2000, you can also use WSH to access the Windows NT Active Directory service. WSH relies on the visual Basic script and JScript script engine provided by IE3.0 and above, so WSH can only be installed after the IE3.0 and above versions are installed.

WSH's corresponding program "WScript.exe" is a scripting language interpreter, which allows a script to be executed just like a batch process. In the WSH script environment, some predefined objects, through its own several built-in objects, can be achieved to obtain environment variables, create shortcuts, loading programs, read and write registry functions. This article is precisely such a concrete application example.

2 The command "WshShell.RegWrite" means to generate a primary key or to generate a key value in the registry;

3 the command "Wshshell.regdelete" is to delete the primary key or key value;

4 primary key and key value is the difference between the primary key name after "\", the key value is not "\";

5) "HKLM" represents HKEY_LOCAL_MACHINE primary key; "HKCU" represents HKEY_CURRENT_USER primary key.

Knowing that the VBS modifies the registry format, the registry may be deleted and you should, of course, back up the registry before you do these things.

2. The batch documents are as follows:

@deltree-y C:\windows\temp\*.*

@deltree-y c:\windows\ "temporary Internet Files" \*.*

@deltree-y C:\windows\history\*.*

@deltree-y C:\windows\recent\*.*

@deltree-y C:\recycled\*.*

@deltree-y C:\windows\cookies\*.*

The first behavior of this batch is to delete the contents of the temporary folder; line second to third, delete the content left behind when IE browser opens the Web page; Delete the contents of the "Start" menu "document" for every four behaviors; line five, delete the contents of the Trash can;

Copy the scripting language files and batch files to the C:\windows folder, double-click the Reg.vbs file to run it, and automatically clean up the registry and the junk folder each time you start your computer.
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.