In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the knowledge of "how to use scripts and batch processing to remove traces from a computer". Many people will encounter such a dilemma in the operation of actual cases. next, let the editor lead you to learn how to deal with these situations! I hope you can read it carefully and be able to achieve something!
We know that using the Windows operating system to open files, enter various passwords or chat with friends on QQ can lead to the disclosure of personal secrets and leave traces on the machine. For safety reasons, if you are on a public computer, you should erase the traces left by these operations when you leave. Here are the possible leak points and solutions.
1. Possible leak points and their existing locations
There are two places where our secrets may be revealed in Windows: one is in the folder, the other is in the registry.
1. Folder: the files we have browsed will be displayed in the documents on the start menu. If they are exposed, our secret will be lost and should be deleted. " The contents of the documents are placed in the C:\ Windows\ Recent folder; the temporary files generated when you install the program and edit the files are placed in the c:\ windows\ temp folder; when the files are deleted, the files are not really deleted and saved in the Recycle Bin, and the things in the Recycle Bin are stored in the C:\ RECYCLED folder (implied) When you browse the website on the Internet, Windows will keep the pages you have seen in the C:\ WINDOWS\ History and C:\ Windows\ Temporary Internet Files folders; inadvertently, Microsoft will get you some cookies from the Internet and put them in C:\ WINDOWS\ Cookies.
two。 Registry: the address of the website that has been entered and the "real name of the network" that was later born in the address bar of IE browser.
In fact, the Windows registry itself is a big garbage warehouse, in which there is garbage, you can find it when you have time. This article only points out one or two points here, and is intended to guide you to follow the analogy and know how to remove the places in the registry that may cause us to disclose secrets.
We know that using the Windows operating system to open files, enter various passwords or chat with friends on QQ can lead to the disclosure of personal secrets and leave traces on the machine. For safety reasons, if you are on a public computer, you should erase the traces left by these operations when you leave. Here are the possible leak points and solutions.
In fact, the Windows registry itself is a big garbage warehouse, in which there is garbage, you can find it when you have time. This article only points out one or two points here, and is intended to guide you to follow the analogy and know how to remove the places in the registry that may cause us to disclose secrets.
Second, specific examples
Two files are used to achieve this function, the VBS script file reg.vbs (you can define your own file name) and the batch file reg.bat (you can define your own file name).
The 1.VBS script file is 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 behaviors of this script define variables, please write according to them. Starting from the third line, it is the processing of the registry. The third line and the fourth behavior add the process file that runs automatically when the computer starts up in the registry, one is that the script itself is reg.vbs, and the other is the reg.bat batch file. The fifth behavior restores the IE start page to "about:blank"; the sixth, seventh and eighth actions remove the web address names that have been viewed in the IE browser address bar; and the ninth, tenth and eleventh actions clear the network real names in the IE address bar.
Here, readers need to master the following points:
1) here we take advantage of the VBS scripting language, and the VBScript code is executed locally through Windows Script Host interpretation. The execution of VBS is inseparable from Windows script host (WSH). WSH is a language-independent script interpretation mechanism based on 32-bit Windows platform provided by Microsoft, which enables scripts to run directly from the Windows desktop or command prompt. With WSH, users can manipulate WSH objects, ActiveX objects, the registry, 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 scripting engines provided by IE3.0 and above, so you can install WSH only after you install IE3.0 and above.
The program "WScript.exe" corresponding to WSH is a scripting language interpreter that enables scripts to be executed just like batch processing. In the WSH scripting environment, some objects are predefined, and through several built-in objects, you can obtain environment variables, create shortcuts, load programs, read and write registry and other functions. This paper is just such a specific application example.
2) the command "WSHShell.RegWrite" means to generate a primary key or a key value in the registry
3) the command "WSHShell.RegDelete" is to delete the primary key or key value
4) the difference between the primary key and the key value is that the primary key name is followed by "\", and the key value has no "\".
5) "HKLM" represents the HKEY_LOCAL_MACHINE primary key; "HKCU" represents the HKEY_CURRENT_USER primary key.
Know that VBS changes the format of the registry, you can delete the registry, of course, before you do these operations, it is best to back up the registry.
two。 The batch file is 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; the second and third lines, delete the contents left after the IE browser opens the web page; every four actions, delete the contents of the "start" menu "document"; the fifth line, delete the contents of the trash can; and the sixth line, delete the cookies.
Copy scripting language files and batch files to the C:\ windows folder, double-click the reg.vbs file to run it, and then automatically clean up the registry and junk folders every time you start your computer.
This is the end of "how to use scripts and batches to remove traces from a computer". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.