bug with net use

473 views
Skip to first unread message

Rob Newkirk

unread,
Mar 25, 2021, 10:35:16 AM3/25/21
to OneCommander
Hello,
I have a script that disconnects and reconnects a network drive as a backup is being performed.  It is using .cmd files and the net use command as follows:

net use w: /DELETE
net use w: \\SYN1\Media
net use w: /DELETE
net use w: \\SYN1\Backup

when One Commander is running there is a prompt that net use displays when reconnecting that does not exist without it running that looks like this:

There are open files and/or incomplete directory searches pending on the connection to w:.
Is it OK to continue disconnecting and force them closed? (Y/N) [N]:

This pauses the script for user input, which is definitely NOT what I want.

In OneCommander's log I find the following:

[15:02:07 ERR] Error in File System Watcher for W:\ (Known issue)
System.IO.InternalBufferOverflowException: Too many changes at once in directory:W:\.
[15:02:07 ERR] Error in File System Watcher for W:\ (Known issue)
System.ComponentModel.Win32Exception (0x80004005): An unexpected network error occurred
[15:02:07 INF] Plugged in Drive:W Type:"2"
[15:02:08 INF] Plugged in Drive:W Type:"2"
[15:02:11 ERR] Error in File System Watcher for W:\ (Known issue)
System.IO.InternalBufferOverflowException: Too many changes at once in directory:W:\.
[15:02:11 ERR] Error in File System Watcher for W:\ (Known issue)
System.ComponentModel.Win32Exception (0x80004005): An unexpected network error occurred

Please work to resolve, this makes the program very difficult to use and I like it a lot.  This would be a deal breaker on buying the program, and I'd be willing to donate $50 to get it fixed.
-Rob

Milos Paripovic

unread,
Mar 25, 2021, 10:17:55 PM3/25/21
to OneCommander
Hi Rob,

It looks like there is no system event on `net use x: /delete` like when removable drive is about to be disconnected that I can use to clear all resources related to the network drive. I'll try a few other things...

Milos Paripovic

unread,
Mar 29, 2021, 1:27:52 PM3/29/21
to OneCommander
The new version 643 doesn't monitor drive changes if contents are not listed in any pane and dismounting should work. There was no way to intercept the `net use` command, but it should work now only if two browser panes are showing any other drive (tabs don't matter). 
I have found that in some cases it won't work as windows thumbnail handler will not release the handle to the last thumbs.db which it creates in all folders on network drives, and that looks to be a bug in the Windows itself. 
One way to get around that issue is disabling Thumbs.db on network folders, which will make the thumbnails listing slower.

Registry path HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer

Setting Name "DisableThumbsDBOnNetworkFolders"

Type  REG_DWORD

Value 1

Please let me know how the new version works for you.
On Thursday, March 25, 2021 at 10:35:16 AM UTC-4 r.newk...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages