Is there any way to get the users login name from the registry using VBScript? I can do it in VB6 but it requires a module.
Printable View
Is there any way to get the users login name from the registry using VBScript? I can do it in VB6 but it requires a module.
somebody correct me if I'm wrong but I don't think that is possible. That would be a big time security risk from a scripting language. I think your best bet is going to be prompting the user for their name and storing it in a session variable or a cookie.
you can do it in VBScript, your users might get a security message though:
Code:<html>
<head>
<script language=vbscript>
sub ReadIt()
dim oShell
set oShell = CreateObject("WScript.Shell")
alert(oShell.RegRead("HKCR\.vbp\"))
end sub
</script>
</head>
<body onload="ReadIt()">
</body>
</html>