如何在注册表项中获取值名称的值数据

时间:2015-01-01 08:19:41

标签: javascript html registry

我有下面的java脚本。我想获取特定注册表项中的值名称的数据。例如,如果键是HKEY_LOCAL_MACHINE \ SOFTWARE \ windows \ CCM \ CcmEval并且值名称是LastSiteCode,我如何获取LastSiteCode的数据。如何在JavaScript中获取此路径?

<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<script language="JavaScript" type="text/javascript">
MyObject = new ActiveXObject( "WScript.Shell" )
function App() {
var code = MyObject.RegRead("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\CCM\\CcmEval\\LastSiteCode")
   document.write(code);
}
</script>
</head>
<body>
<form>
<input type="button" value="Application" onclick="App()">
</form>
</body>
</html>

单击Button后没有在输出中获得“code”变量的值。所以请告诉我如何实现这一点。 提前谢谢。

0 个答案:

没有答案