try
{
var shell = new ActiveXObject("WScript.Shell");
//读注册表值
var key1 = shell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\eip");
//删除注册表项
shell.RegDelete("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\eip");
//往注册表中写入值
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)
{}