Re: Show Network shared folders in Mini File Explorer
Have you FIRSTLY tried mapping the network drive in your normal file manager ?
And after that success, copying and pasting the path that you just used ?
Re: Show Network shared folders in Mini File Explorer
Your program works PROVIDED you have already mapped a network drive.
My main PC is XP, and that is where I create and run VB6 programs.
I fired up my W10 Pro (64bit), and got it to make it's public folder accessible to any PC in my network (no password, and low encryption).
Your program did not see it.
However once I had opened up my file manager in XP PC, and mapped a drive letter to the W10 public folder, your program listed it.
I got your program to offer it by using the little yellow icon (go up a level) to get to the highest level. It then offered that drive letter.
Rob
PS There was a little side benefit to me doing that for you.
I have a XP pc, and W7 and W10 and W10 64bit.
Attempting to share files and folders between them is a PITA nightmare.
Most times I have to zip all the files/folders up, to get the zip across, and then I unzip it in the other PC. Even that gets blocked occasionally.
I reckon MS does it deliberately to make us abandon XP.
I just attempted to copy a folder (with sub folder and files) from XP into that drive letter mapped to W10.
Low and Behold it all went across without a murmur.
Re: Show Network shared folders in Mini File Explorer
PS I detest the FSO
And I like to minimize dependencies (especially MS ones)
Some of you may be interested in a program that has no dependencies - http://www.vb-helper.com/howto_custo...on_dialog.html
It too can see my W10 Public folder.
Re: Show Network shared folders in Mini File Explorer
Originally Posted by Bobbles
Your program works PROVIDED you have already mapped a network drive.
My main PC is XP, and that is where I create and run VB6 programs.
I fired up my W10 Pro (64bit), and got it to make it's public folder accessible to any PC in my network (no password, and low encryption).
Your program did not see it.
However once I had opened up my file manager in XP PC, and mapped a drive letter to the W10 public folder, your program listed it.
I got your program to offer it by using the little yellow icon (go up a level) to get to the highest level. It then offered that drive letter.
Rob
Thanks for the quick reply, however.
My problem is I am trying to display in the Mini Explorer...
the Network Shared Folders... as \\Workstation in the normal Windows XP Explorer pic.
BUT...
If I Map just One of the Shared Folders in the \\Workstation
For example \\Workstation\Bar
and give it the drive letter B = No Problem the Mini Explorer can see it.
I tried to explain my problem as clear as possible.
Thanks again for the quick reply and suggestions
Last edited by BriansBrain; Mar 8th, 2018 at 06:55 AM.
Re: Show Network shared folders in Mini File Explorer
I went back to the mapped drive in my File Manager (XYPlorerFree).
I mimicked the path that the mapping is using -
\\User-pc\users\public
I ran your program and let it settle on the default C:\WINDOWS and I clicked the green arrow.
I then pasted
\\User-pc\users\public
into the top box and clicked the green arrow.
It correctly connected and showed the contents.
As to whether that would work if I went back to XYPlorerFree and Disconnected the network drive, I am unsure ? Shirley you wouldn't want me to lose my new found ability to transfer files and folders between my PCs ?
Re: Show Network shared folders in Mini File Explorer
Originally Posted by Bobbles
I went back to the mapped drive in my File Manager (XYPlorerFree).
I mimicked the path that the mapping is using -
\\User-pc\users\public
I ran your program and let it settle on the default C:\WINDOWS and I clicked the green arrow.
I then pasted
\\User-pc\users\public
into the top box and clicked the green arrow.
So you did the same as I tried... and it works
You opened One of the Shared Folders on you \\User-pc
If I open just One of the Shared Folders for example \\Workstation\Bar
I works...
However... if I try and open \\Workstation = Problem
BUT in the Windows Explorer it can be done as this pic shows.
Re: Show Network shared folders in Mini File Explorer
Hi,
try -Net use- at the CMD
I connected a USB-Stick to my Router and then wright to C:\GetLogCount.txt to show the status...
Code:
Private Sub Command1_Click()
'connect Networkdrive
Dim command As String
command = "net use X: \\speedport.ip\adminchris /persistent:no"
Shell "cmd.exe /c " & command & "> ""C:\GetLogCount.txt"""
End Sub
Private Sub Command2_Click()
'delete
Dim command As String
command = "net use X: /delete"
Shell "cmd.exe /c " & command & "> ""C:\GetLogCount.txt"""
End Sub
Private Sub Command3_Click()
'show status
Dim command As String
command = "net use"
Shell "cmd.exe /c " & command & "> ""C:\GetLogCount.txt"""
End Sub
worth a try
regards
Chris
to hunt a species to extinction is not logical !
since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.
Re: Show Network shared folders in Mini File Explorer
Hi Brain,
see Image, I connect the USB-Stick in the Router as a Drive X:
Explorer
your Mini Explorer
regards
Chris
to hunt a species to extinction is not logical !
since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.
Re: Show Network shared folders in Mini File Explorer
Originally Posted by BriansBrain
Thanks for the link OptionBase1...
I will have a look tomorrow, it's time for food and wine now
I had a look at the link.. .and here is the info...
Originally Posted by Quiver318
You can do it with WMI scripting pretty easily. Such code can be embedded into VB6 SP6.
Note, when the input dialog appears, you can look at the shares on your local PC by putting in a period instead of a computer name. You can put UNC paths to see remote computers on your LAN. Example: \\Computer2
General Declarations:
Code:
Option Explicit
Dim strComputer
Form Level Code:
Code:
Private Sub ListShares(strComputer)
Dim strObject
Dim colShares
Dim objWMIService, objShare
Set objWMIService = GetObject("winmgmts://" & strComputer & "/root/cimv2")
Set colShares = objWMIService.ExecQuery("Select * from Win32_Share")
For Each objShare In colShares
MsgBox objShare.Name & " [" & objShare.Path & "]"
Next
End Sub
Private Sub Form_Load()
Do
strComputer = InputBox("Please enter name of a computer (or . for local host)", "Input")
Loop Until strComputer <> ""
ListShares (strComputer)
End Sub
I added a reference to WMI scripting library V1.2 (wbemdisp.tlb) to my project,
Copied the code, ran it and... GetObject function raises an error :
Re: Show Network shared folders in Mini File Explorer
Hi,
does \\Workstation
As it is NOT Possible to Map \\Workstation
have a IP Address ?
regards
Chris
to hunt a species to extinction is not logical !
since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.
Re: Show Network shared folders in Mini File Explorer
Hi,
I don't want to mess up your network
you can try this .. only if you want !!
for Domain with a user named georg
Code:
net use X: \\server\share /persistent:no /user:domain\georg
regards
Chris
to hunt a species to extinction is not logical !
since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.
Re: Show Network shared folders in Mini File Explorer
Originally Posted by ChrisE
Hi,
I don't want to mess up your network
you can try this .. only if you want !!
for Domain with a user named georg
Code:
net use X: \\server\share /persistent:no /user:domain\georg
regards
Chris
Chris... OK I tried...
net use X: \\workstation\share /persistent:no /user:domain\fred
System Error 53 Has Occurred.
The network path was not found.
From what I can find out it's only possible to Map a shared folder NOT the system.
So ... the above command is trying to map a shared folder called share which does not exist.
Last edited by BriansBrain; Mar 10th, 2018 at 01:28 PM.
Re: Show Network shared folders in Mini File Explorer
Here is an attempt that has a few issues.
Issue 1: "Run-time Error -1"
This untrappable error can occur when testing in the IDE after navigating 2 or 3 times, whether by clicking a folder or using the Back/Forward buttons. It does not seem to occur in compiled programs.
Issue 2: "No pre-Vista support"
As far as I can tell the Shell32.dll type library does not expose the needed interfaces until Windows 6.0 (Vista).
Issue 3: "Must be compiled for each OS" Serious issue
Since Shell32.dll's ActiveX API was never intended to be used except from late-bound scripting languages Microsoft has not made much effort to maintain binary interface compatibility post-Win9x/Windows 2000.
Even on a version of Windows that has the required interfaces exposed, we need some of the events of the ShellFolderView object. VB6 has support for controls via VBControlExtender we never got a similar object for non-control event sources. it was on the list for VB7 like so many things... but VB7 was never to be (instead the .Net Travesty occurred).
To work around this requires the use of some helper object. One that might work is Eduardo A. Morcillo's EventCollection Class v2.0 - Add event support to Collections or something similar. If that doesn't do it (precompiled DLL provided in the download) you might be able to rig something up based on his source code. Get this at:
Full source, CHM documentation, and a precompiled DLL though he didn't provide a .DEP file or a developer install package so you should stick it into C:\Program Files\Common Files\Edanmo and then register it elevated.
Issue 5: "Shell GUIDs"
Many folders are really Shell Namespaces and look like a GUID (ClassID).
Example: Embplorer1.Directory = "shell:::{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}" is the Desktop.
Issue 6: "Clunky user interface"
I leave it to you to refine this as you choose. I just used a fairly simple Toolbar control with a couple of TextBoxes on it. You might have a better idea.
Issue 7: "Awkward name"
Ok, I was trying to be clever: "Embplorer" as in "embedded Explorer."
After entering \\atomant in the Address bar.
Note:
The "address box" normally displays the friendly name of the current folder. To open it for editing and entry of actual paths click on the yellow "folder" button to its left.
A good chunk of the attachment is toolbar button bitmaps and such.
Simply recompiling might not be good enough. Try that first, if that fails then try removing the reference to Microsoft Shell Controls and Automation (which may come up "broken" for you) then add the reference back (for the version on your PC).
This has not been fully debugged. This might not even be what you are after, but it might serve as an example to get you going. If I needed it for anything myself I might follow up on late-binding Shell32.dll but I don't.
Last edited by dilettante; Mar 11th, 2018 at 02:42 PM.
Reason: Small fix to lblStatus on Form1
Re: Show Network shared folders in Mini File Explorer
Originally Posted by BriansBrain
Here is my version of the code with a Form and a ListBox to test
And it worked for me
I just need to build it into the Mini File Explorer now
Thanks for returning and attaching your solutions.
Not enough OPs have that courtesy.
I do all my VB6 development on XP, so have not tried the other attachment below.
This one works fine.
Rob
Last edited by Bobbles; Mar 11th, 2018 at 09:35 PM.
Re: Show Network shared folders in Mini File Explorer
Originally Posted by dilettante
Here is an attempt that has a few issues......................
.
.
This has not been fully debugged. This might not even be what you are after, but it might serve as an example to get you going.
dilettante Thanks very much...
I will download and keep it for a W10 system I am building,
as all my other PCs are Audio Workhorses running XP SP2,
which are connected to the LAN but configured for NO Internet.
Upgrading them is pointless.
Re: Show Network shared folders in Mini File Explorer
Hi Brain,
glad you got it sorted and thanks for sharing
regards
Chris
to hunt a species to extinction is not logical !
since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.
Re: Show Network shared folders in Mini File Explorer
If somebody tries it on XP they might get it working. I just don't have such a machine around anymore, not even a VM. It is really a question of whether or not the Shell32.dll's typilib exposes just enough of the objects and interfaces to make the code work.
It still won't be portable but if this is just for your own use then maybe that isn't an issue.
Re: Show Network shared folders in Mini File Explorer
You might also want to consider using an explorer that uses the shell interfaces; this allows you to browse anything that you can browse in a standard Explorer window. Since you're on XP my projects can't be used, so instead I recommend the project that got me interested in the topic to begin with, Brad Martinez's VBExplorer, which is fully XP compatible with no changes. His site is long gone so I'm attaching the original zip here.
Last edited by fafalone; Mar 15th, 2018 at 09:24 PM.
Re: Show Network shared folders in Mini File Explorer
Originally Posted by dilettante
If somebody tries it on XP they might get it working. I just don't have such a machine around anymore, not even a VM. It is really a question of whether or not the Shell32.dll's typilib exposes just enough of the objects and interfaces to make the code work.
It still won't be portable but if this is just for your own use then maybe that isn't an issue.
I just tried it in XP Pro 32 bit SP3
Running the EXE shows nothing.
Running in the IDE shows this -
Does not crash, just shows the empty controls.
Rob
Re: Show Network shared folders in Mini File Explorer
Originally Posted by xxdoc123
in my win7 32 system have the same problem.
may be you can modify
Embplorer1.Directory = "shell:::{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}"
Embplorer1.Directory = "C:\Users\username?\Desktop"
Thanks for contributing.
You are spot on, in identifying where the problem is.
These are my results -
'Embplorer1.Directory = "C:\Users\username?\Desktop" 'DOES NOT WORK
'Embplorer1.Directory = "C:\Downloads" 'This WORKS
'Embplorer1.Directory = "C:\" 'This WORKS
To Open on My computer in Win XP the following WORKS
Embplorer1.Directory = "shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
Thanks for chipping in,
Rob
PS Does not work when compiled (nothing happens).
Ah! Such is life
Last edited by Bobbles; Mar 16th, 2018 at 05:30 AM.
Reason: Worked out how to open on My Computer (in Wiin XP)