The .profile attribute is available via the winnt provider, so if you're struggling to overcome the username (sAMAccountname) to CN (or DN), then you could just bind, thus:- set objUser=getobject("WinNT://HJT/"&<username>) wscript.echo objUser.profile If you want to actually get the %USERNAME% environment variable, you're gonna have to instantiate a wscript.shell object then access the environment (sub) object. Or you could just use the wscript.network object, and get the current domain (NT stylee) and currently logged on user (again, simply the username / sAMAccount name, NT stylee). If you want to actually use the LDAP provider, you're going to have to confront the slightly uncomfortable, yet implacable reality that the sAMAccountname isn't that relevant to the naming of objects in LDAP parlance. So you'll either need to search for it, or do something "trick" like nametranslate. Neil > -----Original Message----- > From: thin-bounce@xxxxxxxxxxxxx > [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Greg Watts > Sent: 14 April 2005 12:25 > To: Thin > Subject: [THIN] Profile Path > > Problem: > > We are moving to Mandatory Profiles with Flex Profiles 4.0. > We are redirecting their folders as documented in the Flex > Profiles documentation. My problem is that we would like to > copy their desktop and favorites from their roaming profiles > when they first logon to their Citrix session. I am trying to > run an LDAP query but the below script will only work if I > add their Display name. I would like to grab their Roaming > Profile path and copy Desktop and Favorites into their home > directory using their %username% variable (h:\desktop and > h:\favorites) when they logon. Is there a better to do this? > I'm not a vb expert so I need a little hand holding. > > > The below script will only work if I add the display name so > how do I use %username% variable to get the profile path? > > On Error Resume Next > > Set objUser = GetObject _ > ("LDAP://cn=Greg Watts,ou=WD Users,dc=HJT,dc=mil") > > Wscript.Echo "Profile Path: " & objUser.ProfilePath > > Thanks in advance! ***************************************************************************** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has come to you in error, please notify the sender immediately and delete this e-mail from your system. You must take no action based on this, nor must you copy or disclose it or any part of its contents to any person or organisation. Statements and opinions contained in this email may not necessarily represent those of Littlewoods. Please note that e-mail communications may be monitored. The registered office of Littlewoods Limited and it's subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is 262152. ***************************************************************************** This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com ******************************************************** This Weeks Sponsor: RTO Software TScale TScale provides a cost-effective way to improve performance, capacity and stability for thin-client servers like Citrix MetaFrame or Microsoft Terminal Services running Windows NT, 2000 or 2003. http://www.rtosoft.com/enter.asp?id)6 ********************************************************** Useful Thin Client Computing Links are available at: http://thin.net/links.cfm ThinWiki community - Excellent SBC Search Capabilities! http://www.thinwiki.com *********************************************************** For Archives, to Unsubscribe, Subscribe or set Digest or Vacation mode use the below link: http://thin.net/citrixlist.cfm