Networking Forums

Networking Forums > Computer Networking > Windows Networking > Force disconnect in netlogon batch file...

Reply
Thread Tools Display Modes

Force disconnect in netlogon batch file...

 
 
Peter Bako
Guest
Posts: n/a

 
      04-05-2006, 12:47 AM
I've setup a netlogon batch file for users to have two drive letters always
mapped, which is required for some older software deployed on the network.
In the batch file I first disconnect the drives, just in case it was
manually remapped to the wrong location, and then do the connect command.
Basically like this:

-------
net use f: /d
net uise g: /d

net use f: \\<server>\<share1>
net use g: \\<server><share2>
--------

Pretty straightforward stuff and it works 99% of the time. However
occationally the batch file hangs during on of the disconnects and claims
that some process has an open connection on it, which is not likely since
the software that would use these letters does not run in the background in
any way. When it does that we have to manually enter "y" to the are you
sure you want to disconnect message. Is there any way to force the
disconnect via the batch file, regardless of any files that Windows thinks
might be using it?

I checked and there is no -y (for always yes) or -f (for force) command
available to the net use command.

Thanks,
Peter


 
Reply With Quote
 
 
 
 
Juergen Heckel
Guest
Posts: n/a

 
      04-05-2006, 06:13 AM
Peter Bako wrote:
>>

> I checked and there is no -y (for always yes) or -f (for force) command
> available to the net use command.
>


Hi,
try /yes.



--
Juergen Heckel
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run a batch file remotely Dane Windows Networking 3 08-03-2009 10:25 PM
Single Batch File Vis-MCSA Windows Networking 11 12-03-2007 05:45 AM
Rinominare File con data attraverso un file Batch Daytan Windows Networking 1 09-18-2007 05:40 PM
Batch File Problems Nikon Windows Networking 2 04-26-2006 07:50 PM
NT Batch file doesn't run Carl Gross Windows Networking 5 10-08-2003 12:51 AM



1 2 3 4 5 6 7 8 9 10 11