Home > Web Front-end > JS Tutorial > body text

How to use js to modify the client registry_javascript skills

WBOY
Release: 2016-05-16 17:25:58
Original
1665 people have browsed it

Copy code The code is as follows:

try
{ var shell = new ActiveXObject("WScript.Shell"); 
//Read registry value

var key1 = shell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\eip");

//Delete registry key
shell.RegDelete("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\eip");

//Write the value into the registry
shell.RegWrite
("HKEY_CURRENT_USER\ Software\Microsoft\Windows\CurrentVersion\Run\eip",
"C:\eip\eip.lnk","REG_SZ");
shell.RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ Run\eip",
"c:\eip\eip.lnk","REG_SZ");
}
catch(e)
{}

Yes Specify the item name by terminating it with a final backslash. Do not include the final backslash when specifying the value name.

Type specification form
REG_SZ string string
REG_DWORD numeric integer
REG_BINARY binary value integer
REG_EXPAND_SZ extensible string (for example, "%windir%\calc.exe ") string

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!