none
Can I start OpenFileDialog or FolderBrowserDialog in a workgroup? RRS feed

  • Question

  • Can I set FolderBrowserDialog.RootFolder or .SelectedPath to a "workgroup"?  Not to a mapped drive but to a workgroup.  Same question for OpenFileDialog.InitialDirectory.

    If I can't get this capability out of .Net, how about Windows (XP)?

    Thanks,  Bob

    Wednesday, September 12, 2012 5:23 PM

Answers

  • Remember, you are not mounting a computer.  You are mounting a disk drive that has shared priviledges.  The disk can be on a host or a file server.  Usually with a work group there will be a common file server that is used to maintain the disks.  The file server is still a computer with an IP address (or host name).  File server often have multiiple ports with each port servicing a different IP subnet (or group of computers).  You really don't care through which port or host you link to the folders, as long as you can access the data.  The syntax of accessing the data will be the same.  Depending on how the disks are mounted on the network will determine any groups that are used.

    As long as you can put the path name into a "window explorer"  (on the computer that is running your visual studio app;liation) and access the data, you should be able to use the same path in your dialog box as the initialfolder.

    A work group is really just an IP subnet which may have limited access by using a mask on the ethernet interface.  A company will normally have a back bone network with a gateway to the outside world.  Off the back bone network there may be some sub nets with groups of computers.  the sub net may have limited access.  Within the network there may be shared disk drives on any host computer that can be access from any other computer.  Also the network may contain specialized computers that are called disk servers which are only uses by administarators but have many disk drives that are shared by many computers.


    jdweng

    Thursday, September 13, 2012 12:07 AM

All replies

  • I was able to set the InitialDirectory as follows

                openFileDialog1.InitialDirectory = @"\\Proj01\projects";
                openFileDialog1.ShowDialog();


    jdweng

    Wednesday, September 12, 2012 9:19 PM
  • Thanks Joel,

    But is Projo1 a workgroup or a specific computer?  That looks like the same syntax for directory: projects on computer: Proj01.  I want to specify a workgroup which I'm pretty sure is a group of computers.

    Thanks,  Bob

    Wednesday, September 12, 2012 10:57 PM
  • Remember, you are not mounting a computer.  You are mounting a disk drive that has shared priviledges.  The disk can be on a host or a file server.  Usually with a work group there will be a common file server that is used to maintain the disks.  The file server is still a computer with an IP address (or host name).  File server often have multiiple ports with each port servicing a different IP subnet (or group of computers).  You really don't care through which port or host you link to the folders, as long as you can access the data.  The syntax of accessing the data will be the same.  Depending on how the disks are mounted on the network will determine any groups that are used.

    As long as you can put the path name into a "window explorer"  (on the computer that is running your visual studio app;liation) and access the data, you should be able to use the same path in your dialog box as the initialfolder.

    A work group is really just an IP subnet which may have limited access by using a mask on the ethernet interface.  A company will normally have a back bone network with a gateway to the outside world.  Off the back bone network there may be some sub nets with groups of computers.  the sub net may have limited access.  Within the network there may be shared disk drives on any host computer that can be access from any other computer.  Also the network may contain specialized computers that are called disk servers which are only uses by administarators but have many disk drives that are shared by many computers.


    jdweng

    Thursday, September 13, 2012 12:07 AM
  • I may have the answer to the "can I" part of this question, at least for WinXP.  I finally got my XP system to network with my Win7 systems.  So now if I do a .Net OpenFileDialog on the XP system I can select "My Network Places" then "Entire Network" then "Microsoft Windows Network" then "Wgbobshome" (the workgroup that all of my computers belong to) and then I see the three computers in the workgroup.

    But the question is what syntax do I provide to OpenFileDialog.InitialDirectory to start at the workgroup node?  And, of course, the same question for FolderBrowserDialog.RootFolder or .SelectedPath.  (When I select a file and look at the path it begins with the name of the specific computer on which the file is located.  In other words, it skips PAST the workgroup node.  I want to go straight to the workgroup node so that the first selection the end user makes is which computer in the workgroup.)

    Thanks,  Bob

     
    Thursday, September 13, 2012 12:58 AM
  • Thanks Joel,

    I am sure not a networking guy, so much of what you said is over my head.  All I know is that I can define a workgroup in my peer coupled home network and (now that I have it working, as of an hour ago) I can navigate to the workgroup and then to one of the computers in the workgroup - see my other post.  I think that's what my customer wants although he's not a networking guy either so we have the blind leading the blind. 

    He claims that another piece of software he uses starts the navigation at a workgroup.  He's supposed to send me a screen shot tomorrow.  That will hopefully give me a better idea of what he's talking about.

    Thanks again,  Bob

    Thursday, September 13, 2012 1:09 AM
  • Youi have to distinguish between the phyical configuration and the vitual configuration.  When a computer boots up it mounts drives.  These drive can either be phyically on the computer or on a remote computer.  It may appear that the disks are local but they could be on a remote piece of hardware.

    Most likely what your customer is going to show you is a disk server with a number of hard drives mounted.  That is the work group you are refering to.  The work group may be at the root level of his his screen shot or could be at a lower level in his file structure.

    You should be able to send him a very simple application that is only a couple of lines like the code below

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    namespace WindowsFormsApplication1
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
                openFileDialog1.InitialDirectory = @"\\Proj01\projects";
                openFileDialog1.ShowDialog();
            }
        }
    }


    jdweng

    Thursday, September 13, 2012 6:32 AM