Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-01-2004, 02:39 AM
WebProWorld New Member
 

Join Date: Feb 2004
Posts: 6
rahmatab RepRank 0
Default How to get the system logined account name

Hi..

How to get the system logined account name or Active Directory user name logined in local PC?

Anybody know any object to extract current logined user name or account name by VB Script? and any examples coding?

Thanks
__________________
No GuT No GloRy
Reply With Quote
  #2 (permalink)  
Old 04-01-2004, 03:17 AM
sijpie's Avatar
WebProWorld Pro
 

Join Date: Sep 2003
Location: Scotland
Posts: 108
sijpie RepRank 0
Default

Hope that this helps (from SearchWin2000):
Quote:
I have read all about the environmental variables such as %homepath% and %username%. Can either of these variables be used in a login script (.bat) file? I have tried every possible combination. If it can be done, what is the syntax? The profiles tab in the ADS for users has the homepath as serverdiruser. Obviously I am trying to map a drive letter to serverdiruser, where each user is unique.
This question posed on 25 March 2002


It all depends on what user context the batch file runs in. If the batch file is kicked off in the LOCAL_SYSTEM account, those environment variables won't be defined. However, if the batch file is started from the user's account, simply specify them like SERVER%USERNAME%.
__________________
Jaap

PalmVenue
Broekhuizen Paintings
MacSijp

You've done it all
You've broken every code (Steve Harley)
Reply With Quote
  #3 (permalink)  
Old 04-01-2004, 03:47 AM
WebProWorld New Member
 

Join Date: Feb 2004
Posts: 6
rahmatab RepRank 0
Default Get the login name

Thanks Web Pro World

Is there any example for me? In 22 March 2002 there same subject with me ? Can i get the archive ?
__________________
No GuT No GloRy
Reply With Quote
  #4 (permalink)  
Old 04-01-2004, 03:49 AM
sijpie's Avatar
WebProWorld Pro
 

Join Date: Sep 2003
Location: Scotland
Posts: 108
sijpie RepRank 0
Default

Try these:

ASP: Request.ServerVariables("LOGON_USER"). This will return u the username retrieved from windows login

VB: http://www.codeguru.com/forum/showth...ndows+username

http://www.codeguru.com/forum/showth...ndows+username

http://www.codeguru.com/forum/showth...ndows+username
__________________
Jaap

PalmVenue
Broekhuizen Paintings
MacSijp

You've done it all
You've broken every code (Steve Harley)
Reply With Quote
  #5 (permalink)  
Old 04-01-2004, 04:15 AM
WebProWorld New Member
 

Join Date: Feb 2004
Posts: 6
rahmatab RepRank 0
Default Login name

Thanks again WebPro World

when i request Request.ServerVariables("LOGON_USER"). That page do not pass any value. That mean ASP: Request.ServerVariables("LOGON_USER") is null.
__________________
No GuT No GloRy
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0