Solved

Login Scripts

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

Gigs: Get Your Project Delivered by an Expert

Select from 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.

Question has a verified solution.

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

My purpose is to describe the basic concepts of virtual memory as implemented in a modern Windows-based operating system. I will also describe the problems inherent in older systems and how virtual memory solves them. The dark ages - before virtu…
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…
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…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

785 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