why somtimes the login scripts don't work?

Posted on 2005-05-06
Medium Priority
Last Modified: 2010-05-18

Some times, for some users, the maped network drives that are configured on the login script don't work. Can anyone make any guesses on why is this happening?

Could the high CPU utllization on the server that the scripts are stored affect the proper functioning of the scripts?


Question by:GreigCityAcademy
  • 4
  • 3
  • 2
  • +2
LVL 35

Expert Comment

by:Nirmal Sharma
ID: 13943504
I am confused here. Sometimes means when it does not work? Present a situation when it doesn't work. I mean to say produce the sequence of process.

1. Clients log on to the server.
2. User logs on to the computer.
3. Login script doesn't work.
4. User log off and then login script works.

Let me know.


Author Comment

ID: 13943563
We use a logon script to delete any previously mapped networked drives and then map the required drives.  For quite a few users (with no particular pattern and on a variety of PCs) these drives fail to be mapped when they logon to the client PC.  The user has to logon and off several times before the drives will map.

The DC which authenticates the logons and where the logon scripts are stored currently has a high utilisation of if CPU (can be upto %100 when logons are occurring).  The folders to which the network mappings are being created are on a different server.  We are wondering whether a high load on the processor could cause problems with the running of the scripts (maybe in terms of timing out...)

LVL 35

Expert Comment

by:Nirmal Sharma
ID: 13943964
>>>We use a logon script to delete any previously mapped networked drives and then map the required drives.  For quite a few users (with no particular pattern and on a variety of PCs) these drives fail to be mapped when they logon to the client PC.  The user has to logon and off several times before the drives will map.

That means drive has to be deleted before it is re-mapped. Run the command locally on user machine when drives doesn't map or in your words login script doesn't work. You need to the source of problem. You will come to know whether the problem is in connecting to the server who holds the shares or problem with the login script itself (if drive is not deleted you can't remap).
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

LVL 16

Expert Comment

ID: 13944700
Do you have more than 1 domain controller?  Perhaps your script isn't replicated to an alternate DC that the user is authenticating on.

Expert Comment

by:Leandro Iacono
ID: 13948688
As I disscused here (you may want to read it all to understand where I'm going) you'll understand that user logon scripts are by defualt asyncronous which means that they do not need to complete or finish in order for the user to logon to the computer and use it.

So you could either have to wait a couple of minutes for the drives to be mapped or they could timeout and nothing happens.

By defualt that what happens. You can change this behaviour through Group Policys ... I cannot remember the exact key at the moment.

However, as you will read, the problem eventually turned out being something else so this could be many things.

Did you check out the event log? which is what eventually finished sorting out the other users problems?



BTW: I'll try to get you the exact GPO key to change to modify the script behaviour. I think I mentioned a link to Microsoft KB on how to change it in the other post.

Author Comment

ID: 13950346
Hadn't thought of checking script replication however have now and they are replicating accross all our DCs.

Author Comment

ID: 13950363
UICE, thanks for the link, had a quick skim through and it looks promising, will have to wade through it on Monday.

It could be a number of things on our site and looking at some of the info on how the scripts work and thinking about it we may still have a timing issue on our site, we did a crude fix using the net time command however that may not have been completly effective as it does rely on drive mapping to work.
LVL 22

Expert Comment

ID: 13952545
In your logon script, are you checking for success/failure on the calls to RemoveNetworkDrive and MapNetworkDrive?  Are you passing the second parameter of TRUE to RemoveNetworkDrive (to delete the "remembered" setting from the registry)?  Can you add some logic to retry failed operations a few times?

I've built logon scripts to remove all drivemappings then map only the desired set a few times, but I've never witnessed the "sometimes it works and sometimes it doesn't" problem you described.


Expert Comment

by:Leandro Iacono
ID: 13952588
Glad the info could help out.

Please be sure to post up on what you do on monday... I am terribly interested in these type of problems ...

What JesterToo suggested could also help out ...

Maybe make the user scripts Echo errors out if they didn't complete for some reason as he suggested....

Anyways, good luck mate!

Author Comment

ID: 14051547
Sorry for the long delay in replying things have been hectic and this dropped to the bottom of the list.

The following has worked, why I don't know...  we remarked out the line that we where using to delete all mapped drives as shown below;

rem net use * /d /y

We then explicitly deleted the drives one by on using commands as shown below;

net use s: /d
net use etc...

This has solved our problem, if anyone can tell me why I will be interested to hear...

Thanks for your efforts.

Accepted Solution

Leandro Iacono earned 1000 total points
ID: 14053569
I suppose that you then added the proper network drives ...

as you know the net use command is used for these type of things. Maybe all you had to do was make sure the drive letter wasn't in use.

I am not aware of there being a time limit or other type of restriction twords net drives. I honestly can't say why this would specificly happen.

Maybe I am mis interpreting your question ... could you be a bit more specific twords what you would like to know. I meando you want to know why deleting the mapped drives and then re creating them worked, or why deleting drives maked the scripts work ...

i really don't know the specific outcome, and so I don't really know how to answer your question ...

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
LinkedIn blogging is great for networking, building up an audience, and expanding your influence as well. However, if you want to achieve these results, you need to work really hard to make your post worth liking and sharing. Here are 4 tips that ca…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month14 days, left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question