Re: MapNetworkDrive not working during first logon




"Greg" <Greg@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:716120CA-EBCE-4A8E-A0C1-9CCD0D488928@xxxxxxxxxxxxxxxx
Greetings All,

I am having a problem with mapping network drives the very first time a
user
logs onto a computer while their profile is being created. For some
reason,
during the very first interactive logon when a new user logs onto a PC
they
do not get their network drives. Other parts of the logon script
(vbscript)
appear to be working correctly. I can test for group memberhip, display a
pop-up message, write to a log file etc. just not map a drive.

Hmmm, interesting. Could you post your code?

If I manually run the logon script again once the desktop is up then all
of
the drives map correctly and every time after that first logon the drives
get
mapped properly.

I have tried explicitly specifying the value for bUpdateProfile instead of
relying on the default, which should be false, as indicated here:
http://msdn2.microsoft.com/en-us/library/8kst88h6(VS.85).aspx

I have tried enabling userenv logs but I don't really know what to look
for
and I nothing jumped out as an obvious error.

The things that you say are working in your logon script - does that include
code executed *after* the share mapping code? Have you tried using the ERR
object to see if the .mapnetworkdrive method is reporting an error?

My environment is a Windows 2003 native mode domain, Windows XP Pro with
SP2
on the destktops and the logon script is a vbscript that is specified on
the
Profile tab of the user account in active directory users and computers.

Exactly the same as our environment, yet I have never seen this problem.

Any thoughts or suggestions would be appreciated. Work arounds would be
ok
too. Perhaps if there is a way for the logon script to detect that a new
profile is being created then I can take some other actions.

If you could figure out what those alternate actions are, then it would be
simpler to just use that method to do the mapping so that you do not have to
determine if this is the first logon on the machine.

A few questions and thoughts:

Are you running your logon script synchronously or asynchronously?

Does the logon script attribute point to the vbscript directly, or to a
batch script that runs the vbscript using cscript or wscript?

It could be that the script is timing out because it is taking so long to
create the profile. What do you do to ensure that the timeout is not in
effect?

Is the logon script setting qualified with a path? If so, what does it look
like? Could this depend indirectly on something that might not be available
until it runs when the profile is already built? Or does it depend on a
mapping that cannot yet exist?

Might there be some conflict with a group policy object? Or with something
the computer does differently on the first logon?

I'd suggest you show us what the logon script setting is, and post at least
parts of your code.

/Al


.



Relevant Pages

  • RE: Mapped Network Drives
    ... Same logon script as all other users and same logon script that is used when ... >> logs on he recieves a message stating that Mapped Drives not connected and to ... My Computer shows drives disconnected and double clicking ... This problem also occurs when i connect the laptop ...
    (microsoft.public.win2000.general)
  • MapNetworkDrive not working during first logon
    ... I am having a problem with mapping network drives the very first time a user ... logs onto a computer while their profile is being created. ... Other parts of the logon script ... Profile tab of the user account in active directory users and computers. ...
    (microsoft.public.scripting.vbscript)
  • Re: gpo scripts
    ... Well, the way I know they're running, is the fact that i can see the drives ... And yes, if the machine is started, newuserA logs in, the scripts ... scripts look for %username% profile. ...
    (microsoft.public.windows.server.active_directory)
  • Re: MapNetworkDrive not working during first logon
    ... Here is a question you might want to consider: why do you run your logon ... is mapped automatically as part of the users profile. ... if I open a command prompt and switch to one of the mapped drives ... No path is specified for the logon script itself. ...
    (microsoft.public.scripting.vbscript)
  • Re: Map drive on Server
    ... this is the same as using a logon script. ... Microsoft MVP - Terminal Server ... drives to be mapped otherwise what good would security be. ... way to map a drive to the TS server that will be on the server profile not ...
    (microsoft.public.windows.terminal_services)