Solved

Login Scripts

Posted on 2009-06-30
1
266 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article describes how to set permissions to allow a limited-permissions user to start and stop a particular System Service.   It is always best to give users only the permissions that they need to perform their job, so tweaking particular permi…
The password reset disk is often mentioned as the best solution to deal with the lost Windows password problem. In Windows 2008, 7, Vista and XP, a password reset disk can be easily created. But besides Windows 7/Vista/XP, Windows Server 2008 and ot…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

747 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

11 Experts available now in Live!

Get 1:1 Help Now