Solved

Login Scripts

Posted on 2009-06-30
1
267 Views
Last Modified: 2012-05-07
I have a login script that runs when a user log into the domain which maps drives.  If the user does not have access to a particular server, the login script stops and asks for a password.  Does anyone know how to bypass this password request and allow the script to continue without mapping that server drive?  I have included the contents of the script below.  It is the OEMServer drive that is in question.  I do not want to run a separate logon script.

net use m: /delete
net use m: \\mvtsntdc\ET$
net use o: /delete
net use o: \\OEMServer\oem
0
Comment
Question by:orther
1 Comment
 
LVL 83

Accepted Solution

by:
oBdA earned 500 total points
ID: 24749606
You can try to create a directory listing before mapping, and only map if the listing is successful:
net use m: /delete

net use m: \\mvtsntdc\ET$

dir \\OEMServer\oem >NUL 2>&1 || goto SkipODrive

net use o: /delete

net use o: \\OEMServer\oem

:SkipODrive

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now