for anyone who is interested:
net use * /d /yes [or just /y]
will disconnect all shared resources without having to answer yes. for
some reason, the /yes switch is not documented when you type "net help
use" in the DOS command prompt
for more info:
http://www.computerhope.com/nethlp.htm
this is useful for me as my goal is to write a vbscript to disconnect a
user and then connect as a different user.
here is the script:
Dim WShell
Set WShell = WScript.CreateObject("WScript.Shell")
WShell.Run "net use * /d /y", 0, true
WShell.Run "net use w: \\samba\\share /user:username password", 0, true