Results 1 to 3 of 3

Thread: Login Name

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2001
    Posts
    98
    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.

  2. #2
    Lively Member chrisgaddy's Avatar
    Join Date
    Mar 2001
    Location
    Olive Branch, MS
    Posts
    71
    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.

  3. #3
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    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>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width