Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Obtaining win/nt logon userid in vbscript

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,106
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Obtaining win/nt logon userid in vbscript
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Obtaining win/nt logon userid in vbscript - 6/4/2001 11:37:56 PM   
  mid

 

Posts: 16
Score: 0
Joined: 6/4/2001
From: USA
Status: offline
Hello all, any ideas on how to get the logon userid using vbscript??
I'm able to do this in vb but i wonder if vbscript allow me to do
this... I need this to filter users based on logon userid... i don't have
an IIS server and ASP.
 
 
Post #: 1
 
 Re: Obtaining win/nt logon userid in vbscript - 6/4/2001 11:39:20 PM   
  cruiser

 

Posts: 25
Score: 0
Joined: 6/4/2001
From: USA
Status: offline
Are you trying to do this on a web page, ie, on the client. If so, then
good luck, I can't help you. I think this is a security feature.

If you were using ASP, you could look at
Request.ServerVariables("REMOTE_USER") to get the user's
login name, whatever he logged into your site with, anyway. Note
that you can do this only on the server.

(in reply to mid)
 
 
Post #: 2
 
 Re: Obtaining win/nt logon userid in vbscript - 6/4/2001 11:40:42 PM   
  igorz

 

Posts: 3
Score: 0
Joined: 6/4/2001
From: Russia
Status: offline
The WSHNetwork object might help.
Example:

Dim WSHNetwork
Set WSHNetwork = WScript.CreateObject("WScript.Network")

WScript.Echo(WSHNetwork.UserDomain & "\" & _
WSHNetwork.UserName)

(in reply to mid)
 
 
Post #: 3
 
 Re: Obtaining win/nt logon userid in vbscript - 6/4/2001 11:41:49 PM   
  mid

 

Posts: 16
Score: 0
Joined: 6/4/2001
From: USA
Status: offline
Hi all, thank you for your replies.

(in reply to mid)
 
 
Post #: 4
 
 Re: Obtaining win/nt logon userid in vbscript - 11/9/2001 6:06:47 AM   
  abramov

 

Posts: 1
Score: 0
Joined: 11/9/2001
From: Russia
Status: offline
Dear igorz,

thank you for script, what I have used too.

Alexander Abramov

(in reply to mid)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Obtaining win/nt logon userid in vbscript Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts