我是VBscript的新手 . 我正在写一个脚本来读取注册表 . 我已经声明了一个变量,但浏览器显示错误 "Expected end of statement"
这是我的功能:
<script type="text/vbscript">
Function SayHello()
MsgBox "Hello"
HKEY_LOCAL_MACHINE = &H80000002
uninstallRegKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\";
stdRegPro = "winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\default:StdRegProv";
Set objReg=GetObject(stdRegPro)
objReg.EnumKey HKEY_LOCAL_MACHINE, uninstallRegKey, arrSubKeys
MsgBox arrSubKeys
End Function
</script>
它在语句末尾(分号附近)声明变量 uninstallRegKey
时出错
难道我做错了什么?
1 回答
VBScript中没有
;
语句分隔符!