Wonderful scripts and batch to remove traces in your computer

xiaoxiao2021-03-06  14

We know, using the Windows operating system to open the file, enter various passwords or chat with QQ, can cause personal confidential leaks, will leave a trace on the machine. For security, if you are on a public computer, you should erase the traces left after you leave, and below is possible leaks and solutions.

First, possible leaks and their location

There are two places that may leak our secrets in Windows: First, in the folder, one is existing in the registry.

1. Folder: In the "Document" in the "Start" menu, we will display the files we have viewed, if they expose, will make our secrets, should be deleted. The content in the "Document" is placed in the C: / Windows / Recent folder; the installer, the temporary file generated when editing the file is placed in the C: / Windows / Temp folder; the file is not really deleted when deleting the file. Save in the recycle bin, the thing in the recycle station is stored in the C: / Recycled folder (implicit); when you go online, Windows will be in C: / Windows / History and C: / Windows / Temporary Internet The web page you have seen in the Files folder; inadvertent, Microsoft will give you some sweet cakes from the Internet, the cookies are placed in C: / Windows / cookies.

2. In the Registry: The "network real name" that I have left in the IE IE address bar and later born "network real name".

In fact, Windows's registry itself is a big garbage warehouse, and the garbage is put, you can find it when you are free. This article only points out one or two, designed to guide you to touch the category, know how to clear the registry may make us leaked.

Second, the specific example

Implement this feature uses two files, VBS script file reg.vbs (you can define your file name yourself); batch file reg.bat (you can define file name yourself).

The VBS script file is as follows:

Dim WSHShellSet 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 / "" "This script is a defined variable, please write. From the third line, it is the process of the registry. Third line, the fourth behavior automatically runs automatically when the computer starts in the registry, one is the script itself as REG.VBS, and the other is the reg.bat batch file. The fifth behavioral restore IE start page is "about: blank"; sixth, seventh, eight behaviors clear IE's address name left by IE, ninth, ten, eleven behavior clear IE address column The network real name.

Here, the reader needs to master the following points:

1) Here we use the VBS scripting language, and the VBScript code is interpreted by Windows Script Host. The execution of VBS is inseparable from Windows Script Host (WSH). WSH is a 32-bit Windows platform-based script interpretation mechanism provided by Microsoft, which allows scripts to run directly on the Windows desktop or command prompt. With WSH, users can manipulate WSH objects, ActiveX objects, registry, and file systems. Under Windows2000, you can also use WSH to access Windows NT Active Directory Services. WSH depends on the Visual Basic Script and JScript scripting engine provided by IE3.0 and above, so it can only be installed with WSH only after installing IE3.0 and above.

The program "wscript.exe" corresponding to WSH is a scripting language interpreter, which is why the script can be executed, just like execution batch. In the WSH script environment, some objects are predefined. Through several built-in objects itself, you can achieve environment variables, create shortcuts, load programs, read and write registry. This article is exactly a specific application example.

2) The command "wshshell.regWrite" means that the primary key or generates key value is generated in the registry;

3) The command "wshshell.regdelete" is deleted primary key or key value; 4) The difference between the primary key and key value is "/" after the primary key name, the key value is not "/";

5) "HKLM" represents the hkey_local_machine primary key; "HKCU" represents the HKEY_CURRENT_USER key.

After knowing the format of the VBS to modify the registry, the registration is allowed to delete, of course, you should first back up the registry before doing these operations.

2. Batch files are as follows:

@Deltree -yc: / windows / temp /*.*@ deltree -yc: / windows / "temporary internet files" /*.*@ deltree -yc: / windows / history /*.*@ deltree -y C: / Windows/recent/*.*@deltree -y c: / recycled /*.*@ deltree -y c: / windows / cookies /*.*

The first line of this batch is, delete the content of the temporary folder; second, three lines, delete the contents of the IE browser to open the web page; every four behavior, delete the contents of the "Start" menu "Document"; Delete the content in the trash can; the sixth line, delete the small cookie.

Copy the scripting language file and batch file to the C: / Windows folder, double-click the REG.vbs file to run it, and automatically complete the cleaning of the registry and junk folder each time you start your computer.

Third, other

In fact, direct use of scripting languages ​​can also implement the above-mentioned batch function, but the script file is easy to encounter such a prompt information during operation: Windows scripting host script execution error, or: "Type: Microsoft VBSCIPT Run error, Description: No permissions. "This error is thereby aborting the executive script. The cause of these issues is that software related to script processing is installed, such as installation of Office2000 scripting language editing, as well as non-normal shutdown, etc.

The specific practices are as follows:

DIM FSOSet FSO = CreateObject ("scripting.filesystemObject") fso.deletefolder ("c: / windows / cookies /*.*), truefso.deletefile (" c: / windows / cookies /*.*), Truefso. Deletefolder ("C: / Windows / History /*.*), Truefso.Deletefile (" C: / Windows / History /*.* "), Truefso.Deletefolder (" C: / Windows / Temp /*. " ), Truefso.deletefile ("c: / windows / temp /*.*), Truefso.DeleteFolder (" c: / recycled /*.* "), Truefso.Deletefile (" c: / recycled /*.* " ), Truefso.deletefolder ("c: / windows / temporary internet files /*.*"), Truefso.Deletefile ("c: / windows / temporary internet files /*.*"), TRUE

转载请注明原文地址:https://www.9cbs.com/read-48350.html

New Post(0)