How to extract user network login name with vbscript?

Reply

Join Date: May 2005
Posts: 1
Reputation: pomahony is an unknown quantity at this point 
Solved Threads: 0
pomahony pomahony is offline Offline
Newbie Poster

How to extract user network login name with vbscript?

 
0
  #1
May 14th, 2005
Hi,
I have an application (a web browser control within a vb6 form) which shows users their weekly schedule. At the moment they have to input their user id to see the schedule. What I want to do is have their schedules automatically appear according to their network login. I know there is a vbscript for determining the users network login name. Most of the users will be using NT4 with novell client. But they will soon be moving to XP/ADS. I need a script that works in both environments. I would appreciate if someone can help on this.

:lol:
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: How to extract user network login name with vbscript?

 
0
  #2
May 14th, 2005
The only thing that I can think of, is that there has to be something in the registry that holds this information. I mean, VBScript has a method of an object that can get the name of the user currently logged in, but I dunno about retrieving novel's login.... I'll see if I can't find the registry key, but I don't have novel, so it's all google.
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 29
Reputation: vhinehds is an unknown quantity at this point 
Solved Threads: 0
vhinehds's Avatar
vhinehds vhinehds is offline Offline
Light Poster

Re: How to extract user network login name with vbscript?

 
1
  #3
May 18th, 2005
hi, just a thought...

i can extract users login name by using VB's SysInfo control, here's how:


load the SysInfo control by doing this:

1. In the VB IDE click "Project" upper menu.
2. Then "Components"
3. From the list, search for the "Microsoft SysInfo Control" and click
it.
4. Put the control on the form.



then declare first...
Public sysInfo2 As New ActiveDs.WinNTSystemInfo 'declaration for using
'the active directory
'type library
Public SysUser As String


'get the username

SysUser = sysInfo2.username
text1.text = trim(Sysuser)


hope this one works for you...good luck.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: How to extract user network login name with vbscript?

 
0
  #4
May 18th, 2005
Nice One.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC