﻿//var sTring = "HKEY_LOCAL_MACHINE\\SOFTWARE\\CTAIS20\\";
//var reg = regRead(sTring+"FWSK_DKFP\\CHECKTYPE");//取得导出路径


//reg的值就是CHECKTYPE结点的值

////////////////注册表编辑类start//////////////////////

/** 返回名为 strName 的注册键或值。
* @param strName 要读取的键或值。如果 strName 以反斜线 (\) 结束，本方法将返回键，而不是值
* @return 名为 strName 的注册键或值
*/
function regRead(strName)
{
    var val = null;
    try 
    {
        this.shell = new ActiveXObject("WScript.Shell");
        val = this.shell.regRead(strName);
    } catch (e) {
       //alert(e.message);
    }
    return val;
}

/** 设置 strName 指定的注册键或值
* @param strName 要写的键或值的名称.如果 strName 以反斜线 (\) 结束，本方法将返回键，而不是值
* @param anyValue 要写入键或注册表值中的值
* @param strType 可选项。要保存到注册表中的值的数据类型REG_SZ、REG_EXPAND_SZ、REG_DWORD、REG_BINARY
*/
function regWrite(strName,anyValue,strType)
{
    this.shell = new ActiveXObject("WScript.Shell");
    if(strType == null)
       strType = "REG_SZ";
    this.shell.regWrite(strName,anyValue,strType);
}

/** 从注册表中删除 strName 指定的键或值。
* @param strName 要删除的键或值的名字。如果 strName 以反斜线 (\) 结束，本方法将删除键，而不是值
*/
function regDelete(strName)
{
    this.shell = new ActiveXObject("WScript.Shell");
    this.shell.regDelete(strName);
}

////////////////注册表编辑类end//////////////////////
 

