Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Retrieving NT4 Account Description

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Retrieving NT4 Account Description
  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 >>
 Retrieving NT4 Account Description - 3/30/2004 2:02:04 AM   
  rruck

 

Posts: 1
Score: 0
Joined: 3/30/2004
From: USA
Status: offline
All,

I am trying to retrieve the NT4 account description of a user logging on. I want this so that I can set the users ÓHome ServerÔ to map drives. I created the previous script in VBS and here is a snippet,

Dim StrUser
Dim StrComp
Dim StrLoc
Dim HomeServer

'Determine the homeserver & assign it to a variable to make script universal.

set wshshell = wscript.createobject("wscript.shell")
StrComp = wshshell.expandenvironmentstrings("%computername%")
StrLoc = Left(StrComp, 3)

If StrLoc = "TPA" then
HomeServer = "\\TPAFS001" 'Tampa Server

ElseIf StrLoc = "NYK" then
HomeServer = "\\NYKFS001" 'New York Server

This worked well with our workstation naming convention; the problem is we are now using Citrix servers and I want the code to work. If I use the account description, it will be independent of the userÒs computer and should work. The problem is, I canÒt figure out how to so this! In VBS, I want to grab the NT 4.0 account description and set it to a variable as I did with the computer name above. This is much easier with Windows 2000 AD; unfortunately I need it for NT4

Can anyone help with this?

Much thanks in advance.
 
 
Post #: 1
 
 
 
  

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 >> Retrieving NT4 Account Description 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