how do we convert following vbscript to javascript?
<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>
Any help appreciated.
Thanks, Lok.
You can, if you use JScript (Microsoft's implementation of Javascript for Windows) and some information e.g.
(found by googling "jscript wmi").
Evidence:
output: