dcsimg
Results 1 to 33 of 33
  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Question Show Network shared folders in Mini File Explorer

    Hello...

    I found a Mini Explorer for VB6 here...
    http://planetsourcecode.com/vb/scrip...36535&lngWId=1

    I have included the original zip from Planet Source Code.

    I am trying to display in the Mini Explorer the Network shared folders...
    (as \\Workstation in the normal Windows XP Explorer pic)

    I have tried without success

    Thanks in advance for any suggestions
    Attached Images Attached Images   
    Attached Files Attached Files

  2. #2
    Frenzied Member
    Join Date
    Dec 2008
    Posts
    1,116

    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 ?

    Rob

  3. #3
    Frenzied Member
    Join Date
    Dec 2008
    Posts
    1,116

    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.

    Rob

  4. #4
    Frenzied Member
    Join Date
    Dec 2008
    Posts
    1,116

    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.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: Show Network shared folders in Mini File Explorer

    Quote Originally Posted by Bobbles View Post
    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
    Attached Images Attached Images  
    Last edited by BriansBrain; Mar 8th, 2018 at 05:55 AM.

  6. #6
    Frenzied Member
    Join Date
    Dec 2008
    Posts
    1,116

    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 ?

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: Show Network shared folders in Mini File Explorer

    Quote Originally Posted by Bobbles View Post
    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.
    Attached Images Attached Images  

  8. #8
    Frenzied Member ChrisE's Avatar
    Join Date
    Jun 2017
    Location
    Frankfurt
    Posts
    1,063

    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.

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: Show Network shared folders in Mini File Explorer

    Quote Originally Posted by ChrisE View Post
    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...

    worth a try
    Chris, thanks a lot for the reply...

    But, I can't see how it's going to help in the Mini Explorer program ?

    Regards

  10. #10
    Frenzied Member ChrisE's Avatar
    Join Date
    Jun 2017
    Location
    Frankfurt
    Posts
    1,063

    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
    Name:  Networkdrive.JPG
Views: 166
Size:  26.4 KB

    your Mini Explorer
    Name:  Networkdrive2.JPG
Views: 165
Size:  18.3 KB

    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.

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: Show Network shared folders in Mini File Explorer

    Quote Originally Posted by ChrisE View Post
    Hi Brain,

    see Image, I connect the USB-Stick in the Router as a Drive X:

    Explorer
    Name:  Networkdrive.JPG
Views: 166
Size:  26.4 KB

    your Mini Explorer
    Name:  Networkdrive2.JPG
Views: 165
Size:  18.3 KB

    regards
    Chris
    Thanks again for the reply Chris,

    You Mapped the drive as user Bobbles suggested..

    But using net use instead of the Windows Dialogue Box...

    This does not cure my problem.

    As it is NOT Possible to Map \\Workstation

    BUT it is Possible to Map Individual Folders example \\Workstation\Bar

    Yet it is possible in Windows Explorer...
    Attached Images Attached Images  

  12. #12
    Hyperactive Member
    Join Date
    Nov 2017
    Posts
    339

    Re: Show Network shared folders in Mini File Explorer


  13. #13

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: Show Network shared folders in Mini File Explorer

    Quote Originally Posted by OptionBase1 View Post
    Thanks for the link OptionBase1...
    I will have a look tomorrow, it's time for food and wine now

  14. #14

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: Show Network shared folders in Mini File Explorer

    Quote Originally Posted by BriansBrain View Post
    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...

    Quote Originally Posted by Quiver318 View Post
    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 :

    Run-time error '-2147217375(80041021)':
    Automation error
    Another member had the same error reported but there was no solution posted.

    I am using Windows XP SP2 and VB6 SP6.

    Any Ideas

    EDIT

    However using a dot > . for local host works
    Last edited by BriansBrain; Mar 9th, 2018 at 06:35 AM.

  15. #15
    Frenzied Member ChrisE's Avatar
    Join Date
    Jun 2017
    Location
    Frankfurt
    Posts
    1,063

    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.

  16. #16

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: Show Network shared folders in Mini File Explorer

    Quote Originally Posted by ChrisE View Post
    Hi,

    does \\Workstation

    have a IP Address ?

    regards
    Chris

    Chris
    Of course it does --
    -- it's on my LAN and fixed at 192.168.1.200


  17. #17
    Frenzied Member ChrisE's Avatar
    Join Date
    Jun 2017
    Location
    Frankfurt
    Posts
    1,063

    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.

  18. #18

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: Show Network shared folders in Mini File Explorer

    Quote Originally Posted by ChrisE View Post
    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 12:28 PM.

  19. #19

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: Show Network shared folders in Mini File Explorer



    OK I'm looking at this thread...

    http://www.vbforums.com/showthread.p...ers-on-network

    Looks like the code in the thread can do the job

  20. #20

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: Show Network shared folders in Mini File Explorer

    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
    Attached Files Attached Files
    Last edited by BriansBrain; Mar 11th, 2018 at 10:20 AM.

  21. #21

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: Show Network shared folders in Mini File Explorer

    And here is something else I found useful

    Browse to Obtain Network Machines or Shares

    http://vbnet.mvps.org/index.html?cod...wsenetwork.htm


  22. #22
    PowerPoster
    Join Date
    Feb 2006
    Posts
    18,857

    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.

    Issue 4: "Fixing issue 3, late-bound Shell32.dll brings complexity"

    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:

    http://www.mvps.org/emorcillo/en/code/vb6/index.shtml

    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."



    Name:  sshot.png
Views: 110
Size:  4.3 KB

    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.
    Attached Files Attached Files
    Last edited by dilettante; Mar 11th, 2018 at 02:42 PM. Reason: Small fix to lblStatus on Form1

  23. #23
    Frenzied Member
    Join Date
    Dec 2008
    Posts
    1,116

    Re: Show Network shared folders in Mini File Explorer

    Quote Originally Posted by BriansBrain View Post
    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.

  24. #24

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: Show Network shared folders in Mini File Explorer

    Quote Originally Posted by dilettante View Post
    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.


  25. #25

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: Show Network shared folders in Mini File Explorer

    Quote Originally Posted by Bobbles View Post
    Thanks for returning and attaching your solutions.
    Not enough OPs have that courtesy.
    Rob, you are welcome.

    Quote Originally Posted by Bobbles View Post
    I do all my VB6 development on XP, so have not tried the other attachment below.
    Here is my version of the project from the "attachment below" you mentioned in a zip

    And YES it works in XP
    Attached Files Attached Files

  26. #26
    Frenzied Member ChrisE's Avatar
    Join Date
    Jun 2017
    Location
    Frankfurt
    Posts
    1,063

    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.

  27. #27

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: Show Network shared folders in Mini File Explorer

    Quote Originally Posted by ChrisE View Post
    Hi Brain,

    glad you got it sorted and thanks for sharing

    regards
    Chris
    Chris...

    Thanks........ It's nearly [RESOLVED]

    I'm trying to combine the codes to make the Mini Explorer do what I want it to.

    Which is list the shared folders of a system on the LAN

  28. #28
    PowerPoster
    Join Date
    Feb 2006
    Posts
    18,857

    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.

  29. #29
    Frenzied Member
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    1,931

    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.
    Attached Files Attached Files

  30. #30
    Frenzied Member
    Join Date
    Dec 2008
    Posts
    1,116

    Re: Show Network shared folders in Mini File Explorer

    Quote Originally Posted by dilettante View Post
    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 -
    Name:  IDE_Run_gives_this.jpg
Views: 61
Size:  42.0 KB

    Does not crash, just shows the empty controls.
    Rob

  31. #31
    Addicted Member
    Join Date
    Aug 2016
    Posts
    245

    Re: Show Network shared folders in Mini File Explorer

    in my win7 32 system have the same problem.

    may be you can modiy

    Embplorer1.Directory = "shell:::{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}"

    Embplorer1.Directory = "C:\Users\username?\Desktop"

  32. #32
    Frenzied Member
    Join Date
    Dec 2008
    Posts
    1,116

    Re: Show Network shared folders in Mini File Explorer

    Quote Originally Posted by xxdoc123 View Post
    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)

  33. #33

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: Show Network shared folders in Mini File Explorer

    Quote Originally Posted by fafalone View Post
    You might also want to consider using an explorer that uses the shell interfaces...

    His site is long gone so I'm attaching the original zip here.
    Sorry, I was off for a couple of days

    Thanks very much fafalone I have downloaded it and will try it ASAP


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width


×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.