?
Solved

Forcing MAP drive to be deleted. URGENT

Posted on 2004-12-01
5
Medium Priority
?
1,534 Views
Last Modified: 2008-02-26
I'm running a map drive disconnection using dos command:
NET USE z: /delete

and sometimes it says:
There are open files and/or incomplete directory searches pending on connection to z:
Is it ok to continue disconnectind and force them closed? Y:N

How can I force that automaticley to Y, and not having that message to prompt me for Y or N?

Thanks
jdff

0
Comment
Question by:jdff
5 Comments
 
LVL 18

Expert Comment

by:luv2smile
ID: 12717136
Not sure about your method, but I use this method to delete mappings and have had no issues:

http://www.computerperformance.co.uk/Logon/Logon_Remove.htm
0
 
LVL 1

Expert Comment

by:paul_knapp
ID: 12717248
@echo off
If %OS% == Windows_NT GOTO WINNT
Echo The batch did not detect Windows NT, using Win9x
GOTO WIN9X

:WINNT
net use q: \\server\sharename /persistent:no
GOTO OUT

:WIN9X
net use q: \\server\sharename
GOTO OUT

:OUT

Above is a copy of a login script i use. This script checks the OS & runs the appropriate net use command. The key point here is for Windows 2000 & above is the /persistent:no switch. This stops these OS's from 'keeping' the mapped share. I don't know how u map drives at your  location but i use login scripts. I don't allow users to map drives themselves. By using scripts u can change mapping without having to 'visit' each PC. Let me know
0
 

Author Comment

by:jdff
ID: 12717410
I'm using the same script method but I first delete the map and then recreat them but the problem seams to happen on the deletion. It ask me to force the deletion.

Ideas?
Thanks
jdff
0
 
LVL 1

Assisted Solution

by:paul_knapp
paul_knapp earned 1000 total points
ID: 12717698
If u r using the '/persistent:no' switch for Win2K & XP PC's then u dont need to delete first. Try removing the 'delete' piece, as u really don't need it.
0
 
LVL 85

Accepted Solution

by:
oBdA earned 1000 total points
ID: 12718653
net use z: /delete /yes
will do the trick.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

If you build your web application in Visual Studio you'll get at least a few binaries, or .DLL, files in your bin folder. However, there is more compiling to be done. Normally this would happen when an ASP.NET resource within the web site is request…
Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

839 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