Re: Good Day, Scripting Guru's

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Jeremy

I took your suggestion and just renamed the folders, It is easier and Yes, a
good practice to get into.
--
Scott A Cummins
Sr. Systems Engineer
Equity Analytics
( A division of Merrill Lynch)
14614 N. Keirland Blvd
Scottsdale, AZ 85254
480-998-3515


"Jeremy" wrote:

You can pull the display name out of AD with a vbscript. The normal
practice is to use their usernames because that variable is available
everywhere, even when you create the user. Say you create a user called Bob
Smith whose user name is BSmith. When you put in their home path and
profile path variables and you type \\server\share\%username% ADUC does
variable iterpolation. This way a template user with all those paths can be
created.

I recommend you go through the pain of renaming them all now and changing
your practice to user the user name instead of the display name. It will be
better in the long run.

If you don't, here is some code that will get the display name into a
variable:

' Get full username from AD
Set oADSystemInfo = CreateObject("ADSystemInfo")


' get AD user object
Set oADsUser = GetObject("LDAP://"; & oADSystemInfo.UserName)


' get full name of the current user
sDisplayName = oADsUser.DisplayName

'map the drive
Set WshNetwork = WScript.CreateObject("WScript.Network")
WSHNetwork.MapNetworkDrive "J:", "\\server\share\" & sDisplayName

I haven't tested this, but it should word.

"Scott Cummins" <scummins@xxxxxxxxxxxxxxxxx> wrote in message
news:E981048C-B5E9-460D-B755-20777CBD02AD@xxxxxxxxxxxxxxxx
Jeremy

Thanks for your input, Unfortuantely that doesn't seem to work, Unless i
am
doing something wrong. I may change the folder names to their username,
But
If I could use their display name somewhere it would be so helpful. Any
other
suggestions, from anyone?
--
Scott A Cummins
Sr. Systems Engineer
Equity Analytics
( A division of Merrill Lynch)
14614 N. Keirland Blvd
Scottsdale, AZ 85254
480-998-3515


"Jeremy" wrote:

Try:
net use J: \\servername\sharename\%username%
There is no environment variable called DISPLAYNAME on windows clients.
"Scott Cummins" wrote:

I am trying to write a little logon script that will map a user to his
own
folder on a seperate network drive, The folders are named the same as
their
display names, so I am basically trying to map a drive through group
policy,
My third

But since I am a colossal pinhead, I can't get my version to work

lets say i have a folder on a network share called "Colossal Pinhead"
which
would also be my display name, then I create a little batch file called

net use j:\servername\PST\%displayname%

and I set it to run at logon, would this work for me
--
Scott A Cummins
Scripting Novice
Equity Analytics
( A division of Merrill Lynch)
14614 N. Keirland Blvd
Scottsdale, AZ 85254
480-998-3515


.



Relevant Pages

  • Re: Where Have My e-Mail Contacts Gone?
    ... "Russ Valentine" wrote: ... It tells the address book view which folder to display as its default. ... When I type in ROBBIE in the search box all Robbies ...
    (microsoft.public.outlook.contacts)
  • Re: Where Have My e-Mail Contacts Gone?
    ... "Russ Valentine" wrote: ... It tells the address book view which folder to display as its default. ... When I type in ROBBIE in the search box all Robbies are ...
    (microsoft.public.outlook.contacts)
  • Re: Issues with media features on 360
    ... I'm running XP Pro with the Media ... By far the biggest issue is the perceived album name uniqueness. ... >>> have to display the year as well). ... When displaying pictures from the PC you start with folder names. ...
    (microsoft.public.windows.mediacenter)
  • Re: Where Have My e-Mail Contacts Gone?
    ... In other words I cannot see any means of setting a default folder. ... "Russ Valentine" wrote: ... default display folder. ... When I type in ROBBIE in the search box all Robbies are ...
    (microsoft.public.outlook.contacts)
  • Re: Where Have My e-Mail Contacts Gone?
    ... It tells the address book view which folder to display as its default. ... Russ Valentine ... When I type in ROBBIE in the search box all Robbies are ...
    (microsoft.public.outlook.contacts)