Catalina complaining of Network Access

When I run one of my apps on Catalina, it asks permission for the program to access network drives. I don’t need access to network drives, so in a perfect world, this message would not come up.
I understand that this message may go away once I’ve properly signed and notarized my app (still working on that), but for curiosity sake, is there a way to avoid looking at Network drives when trying to find a particular volume?
My program performs a firmware update on an external device which shows up as an external USB drive, but it first has to find that device by checking each volume to see if the appropriate file is contained therein. I suppose it’s scan is also looking at network drives, and this may be why Catalina is complaining.

Is the following code causing the warning in Catalina? Can anyone suggest a “better” way to scan that would only look at external USB volumes?
Oh - it’s cross-platform so this has to work on Windows too. (It does currently)

For CurVolNum as Integer = 0 to VolumeCount -1 Try f = Volume(CurVolNum) If f.Count = 1 And f.item(1).Name = "firmware.bin" Then Exit For Else f = Nil End If Catch ex As IOException f = Nil End Try Next CurVolNum

The warnings won’t go away when you sign and notarize your app.

If you have a network volume mounted then you need to have access to it if you want to get the name. So this looks like a feature and not a bug.

Ok, so no way to identify network volumes and avoid them without getting their name? (Chicken/Egg?)

I believe MBS has a plugin that can tell you if a volume is a network or local usb based one
And that they even have such a thing for mac & windows

Ok. Probably not worth it just for this, but good to know.
Thanks, Norman.

pretty sure you could, on macOS, determine whether its a network drive or not by examining the output of the mount command and parsing it apart looking for the Volumes full path in that output

mount tells you if the drive is local or not along with several other useful bits

Norman’s method works for both macOS and Linux:

theShell.Execute “mount”

You will need to parse the “theShell.ReadAll” results, but it won’t flag network access.

What’s “theShell” ?

Would I need a completely different procedure on Windows?

theShell is a Shell object instance

dim theShell as new Shell
theShell.Execute "mount"
.. code here to parse the results apart

Sorry - my knowledge <> your knowledge :S

Norman beat me to it. More clearly:

[code]Dim theShell As New Shell
Dim mntResults(-1) As String
Dim a As Integer

theShell.Mode = 1
theShell.Timeout = -1
theShell.Execute “/bin/mount”
Loop Until Not theShell.IsRunning
mntResults = SplitB(theShell.ReadAll)

// Walk through the mntResults array to find your non-network volumes.
For a = 0 To mntResults.Ubound


Gotcha. Thanks, Gents.

On further thought, I’ll just live with the customer needing to hit “Ok”. Much less work.