Click to See Complete Forum and Search --> : Login Name
coopetj
Mar 16th, 2001, 06:47 PM
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.
chrisgaddy
Mar 16th, 2001, 07:24 PM
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.
Clunietp
Mar 18th, 2001, 09:38 AM
you can do it in VBScript, your users might get a security message though:
<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>
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.