SelectDirectory and Mapped Drives.

I'm using SelectDirectory in Vcl.FileCtrl for directory picking. Whether I pass in sdShowShares or not, mapped drives do not show up in the list. This is true for Windows 7 / 8.

Have tried this on a couple different boxes and the mapped drives never display. Local drives to the machine such as hard drives and DVD drives do display.

How can I show mapped drives using SelectDirectory?
0
Jeff
8/12/2015 6:21:33 PM
embarcadero.delphi.nativeapi 1236 articles. 1 followers. Follow

7 Replies
1792 Views

Similar Articles

[PageSpeed] 26
Get it on Google Play
Get it on Apple App Store

Jeff wrote:

> I'm using SelectDirectory in Vcl.FileCtrl for directory picking.

Which *overload* of SelectDirectory() are you using, though?  It makes a 
difference.

One overload displays a custom VCL form that does not support sdShowShares, 
and uses TDriveComboBox to display only drives with drive letters assigned 
to them (is your share mapped to a drive letter?).

The other overload displays a standard OS folder selection dialog, which 
supports sdShowShares.

-- 
Remy Lebeau (TeamB)
0
Remy
8/12/2015 8:07:42 PM
> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> Jeff wrote:
> 
> > I'm using SelectDirectory in Vcl.FileCtrl for directory picking.
> 
> Which *overload* of SelectDirectory() are you using, though?  It makes a 
> difference.
> 
> One overload displays a custom VCL form that does not support sdShowShares, 
> and uses TDriveComboBox to display only drives with drive letters assigned 
> to them (is your share mapped to a drive letter?).
> 
> The other overload displays a standard OS folder selection dialog, which 
> supports sdShowShares.

Yes, the shares are mapped to a drive letter.

I can use the overload that takes directory, options and help context and it shows the  mapped drive letters in the drive drop-down box. However, this dialog is pretty dated, visually and not something we would use.

What's not working is the overload that takes TSelectDirExtOpts as a parameter where we're passing in sdShowShares. We see the local drive letters but the shares mapped to drive letters don't show up.
0
Jeff
8/14/2015 7:38:00 PM
Jeff wrote:

> I can use the overload that takes directory, options and help context
> and it shows the  mapped drive letters in the drive drop-down box.
> However, this dialog is pretty dated, visually and not something we
> would use.

That is the custom VCL dialog that does not support sdShowShares.  It simply 
displays whatever driver letters are reported by GetLogicalDrives().

> What's not working is the overload that takes TSelectDirExtOpts as
> a parameter where we're passing in sdShowShares.

That is the OS native dialog, which does support sdShowShares, but only if 
sdNewUI is also specified.  Are you doing that?

-- 
Remy Lebeau (TeamB)
0
Remy
8/14/2015 7:58:12 PM
> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> Jeff wrote:
> 
> > I can use the overload that takes directory, options and help context
> > and it shows the  mapped drive letters in the drive drop-down box.
> > However, this dialog is pretty dated, visually and not something we
> > would use.
> 
> That is the custom VCL dialog that does not support sdShowShares.  It simply 
> displays whatever driver letters are reported by GetLogicalDrives().
> 
> > What's not working is the overload that takes TSelectDirExtOpts as
> > a parameter where we're passing in sdShowShares.
> 
> That is the OS native dialog, which does support sdShowShares, but only if 
> sdNewUI is also specified.  Are you doing that?

Yes, I have the following:

 AOptions := [sdNewUI, sdShowShares];
  DirOkOrCancel := False;
  repeat

    Result := SelectDirectory(Caption, Root, Directory, AOptions, nil);
    if not Result or (Result and IsExportPathAllowed(Directory, True)) then
      DirOkOrCancel := True;
  until DirOkOrCancel;

Under "My Computer" the only drives listed are local physical drives. In Windows I can navigate to "My Computer" and see two additional  network locations that are mapped drives "Y:" and "Z:"
0
Jeff
8/14/2015 8:34:23 PM
Jeff wrote:

> Under "My Computer" the only drives listed are local physical drives.
> In Windows I can navigate to "My Computer" and see two additional
> network locations that are mapped drives "Y:" and "Z:"

Drive letter mappings are stored in the user profile, and thus are user-specific. 
 Is your code running under a different user than who is running Windows 
Explorer?

-- 
Remy Lebeau (TeamB)
0
Remy
8/14/2015 9:13:20 PM
> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> Jeff wrote:
> 
> > Under "My Computer" the only drives listed are local physical drives.
> > In Windows I can navigate to "My Computer" and see two additional
> > network locations that are mapped drives "Y:" and "Z:"
> 
> Drive letter mappings are stored in the user profile, and thus are user-specific. 
>  Is your code running under a different user than who is running Windows 
> Explorer?

Apps are running under the currently logged-in user which has the mapped drives.
0
Jeff
8/18/2015 2:30:49 PM
> {quote:title=Jeff Cope wrote:}{quote}
> > {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> > Jeff wrote:
> > 
> > > I can use the overload that takes directory, options and help context
> > > and it shows the  mapped drive letters in the drive drop-down box.
> > > However, this dialog is pretty dated, visually and not something we
> > > would use.
> > 
> > That is the custom VCL dialog that does not support sdShowShares.  It simply 
> > displays whatever driver letters are reported by GetLogicalDrives().
> > 
> > > What's not working is the overload that takes TSelectDirExtOpts as
> > > a parameter where we're passing in sdShowShares.
> > 
> > That is the OS native dialog, which does support sdShowShares, but only if 
> > sdNewUI is also specified.  Are you doing that?
> 
> Yes, I have the following:
> 
>  AOptions := [sdNewUI, sdShowShares];
>   DirOkOrCancel := False;
>   repeat
> 
>     Result := SelectDirectory(Caption, Root, Directory, AOptions, nil);
>     if not Result or (Result and IsExportPathAllowed(Directory, True)) then
>       DirOkOrCancel := True;
>   until DirOkOrCancel;
> 
> Under "My Computer" the only drives listed are local physical drives. In Windows I can navigate to "My Computer" and see two additional  network locations that are mapped drives "Y:" and "Z:"


More info....This code works OK under XE7 (mapped drives display). Under XE2 it does not work.
0
Jeff
8/18/2015 5:38:41 PM
Reply:

Similar Artilces:

Drives Not Mapping and Loosing Drive mappings
We are having issues with the 4.9SP1a client where I can log in each moring and none of the drives will map. I relogin and then the drive maps. Then we also have issues where a user will come back from lunch and CTRL/ALT/DEL to unlock the screen saver and they loose all of their drive mappings. We are at NW6SP3 with post SP4 Server.EXE file, NSS3C patch, and a couple other patches that were tried to eliminate File Locking issues (MM.NLM, and NCPIP.NLM). The workstations are WiN2K SP4 and WINXP SP1 with Client 4.9SP1A, my XP laptop happens to have the nwgina patch applied also but...

new drive mapping wont overwrite the older drive mapping???
Somehow, although I changed the drive mapping to a new server using the same drive letter in novell login script, all the workstations with xpsp3 still map to the older server after the users log in. I had to disconnect the older drive mapping before the users can map to the new server using the same letter. Is there anyway that I can fix that? I am using "net use" in the login script to map drive to windows share. Thank you! That's odd. The only thing I can think of that would do that would be a manual drive mapping that happened on the workstation end that ov...

Novell "map network drive" not mapping full drive
If I want to map a temporary drive somewhere on our network and try to do it through �My Network Places,� it�ll go to the proper directory but when I look in �My Computer� it only show the server and the volume. I have full rights to the tree so I don�t know what the problem would be. I�m running Netware 6 with support pack 4, and client v4.90.0.0 SP1a. Thanks Nick What options are you selecting in the 'Novell Map Network Drive' dialog ? -- Edison Ortiz Novell Product Support Forum SysOp (No Email Support, Thanks !) I'm not selecting any options, I j...

Network drive cannot be mapped to a drive
I am getting a bizzare error on a Windows XP workstation with Client 4.91 SP2 with patch pack C: "LOGIN-LGNWNT32.DLL-400: A network drive cannot be mapped to a drive that is designated as a local drive. [ROOT H:=]" The container login script is trying to deliver a home directory mapping via this command: map root h:=%HOME_DIRECTORY As per tid (10015081) the user has rights to the directory in question and it is listed in their environment tab, verified with effective rights. There are physically only a C and D drive in the machine, certainly no H. The server is 6.5...

Drive map fails using map.exe but works with login script map
I posted this a little bit back not sure if it was this forum I thought it was titled illegal ds name but I can't find it at all, so forgive me for not appending to that. Windows 2000 sp4, Client 32 4.9sp1 pka I have the following drive map. map r w:=.wdc1_disk1.wdc.tpg\wdc It gives me an error MAP-4.13 (970813) PTF-400: You attempted to map a network drive to unmapped drive or to a local drive. (What's wrong with mapping to an unmapped drive by the way :) ) When I do a packet trace of the machine in question (Using Ethereal 0.10.4) I see the following ...

network drive cannot be mapped to a local drive...
This is the message that i'm getting for most of my drives allong with error 8804. Our network is composed of 4.1 servers with one 6.1 server we recently got. I have no trouble logging in or mapping from any other computer on the network. This is however a brand new computer from dell and I suppose what the message is saying is that all the drive letters are set to be for the local hard drive. I have no idea how to set them to accept the network drives. Here is the full login message... Your current context is Programs.Carrollton.MTII Your current tree is: MTI You are attached t...

Mapping a drive letter to two drives?
I am looking for a program that can map a single drive letter to two consecutive physical drives. I have a couple of old hard drives, a 300MB and a 400MB, and I want to be able to use them as one 700MB drive. I believe that Win2k itselft can do this, but I am running Win98SE. Any suggestions? Thanks Creamy Goodness <nobody@nowhere.com> wrote in message news:9vnqil$1cj7$1@news.grc.com... > I am looking for a program that can map a single drive letter to two > consecutive physical drives. I have a couple of old hard drives, a 300MB and > a 400MB, and I want to be able t...

Search drives mapped as normal drives.
Hi, We have few NW6SP8 servers and NWClient 4.91.0.20050216 on XPSP2 workstations. Everytime a user logins, the drive mappings are arranged properly except the search drives which are mapped to normal drive letters instead of being mapped as search drives. The problem increases whenever a user relogins without restarting the PC, which causes the PC to obtain another new search drive, again mapped as normal drive to an available drive letter. Any solution ? On 26/02/08 Sanal Kisi wrote: > We have few NW6SP8 servers There has been an SP8 for NW 4.11 and 5.1, but not for 5....

Mapped drives and USB pen drives.
How can I keep the act of logging into Novell from mapping network drives that aren't in the login script? After I log in I get an F: drive that leads to the SYS volume and a Z: drive that leads the the Public directory on the SYS volume. Not only do I not need either of these area mapped as a drive, but it keeps the majority of USB pen drives from working properly or at all. As soon as I disconnect the drives, the pen drives will work. Is there a hidden script somewhere that I'm missing? Thanks, Kris Gnagey kgnagey@champaign.org wrote: > How can I keep the ac...

Drive not Formatted Error on Mapped Drive
Hi there I have some users getting a weird error whenever they try to save a file to a mapped drive. The error is: "The disk in drive G is not formatted, do you wish to format it now?" If they click "No" (hopefully!) then the file saves fine. I removed the users from a group that had a ZENworks DLU that gave them User on the local PC, and made them members of a group that gives them Administrator on the local PC. Both groups are only used to assign the zen policy, file rights are granted through another group, and the file rights appear to be correct anyho...

First Network Drive drive mapping changes
Currently running Client 4.91 (4.91.0.20050216) on WinXP sp 2.Have set first network drive to K: in client properties. Drive map is being changed to J: I have physical disks C thru I, reserved J thru Windows for a USB flashdrive. Suggestions on how to keep the drive maps set in the login script. Thanks Dot Garrihy Dot, Can you post the login script or otherwise show how the drive mapping is choosing the J drive letter? -- Tony Pedretti > Dot, > > Can you post the login script or otherwise show how the drive mapping is > choosing the J drive letter?...

Drive mapping and new local drive issue
NW4.2. Cli 4.91.1.20050819 XP pro SP2+ Celeron 1.8, 640M. HD (C:), DVD (D:), USB drive (E:) Original First drive: G (Mapped) additional drives mapped all over the upper alphabet :) Add a Netgear SC101, Network Storage Device into the mix. Netgear (Zetera) connects as a Local drive, assigning the next available drive letter for the attached 'Partition' (on the SC101 drive). The problem is it may use a Netware Map drive letter (upon reboot) if not "Chang(ed) drive letter"( in disk management) to a known unused drive. Netgear claims this is a O/S fault. I th...

Mapped drives and USB pen drives. #2
How can I keep the act of logging into Novell from mapping network drives that aren't in the login script? After I log in I get an F: drive that leads to the SYS volume and a Z: drive that leads the the Public directory on the SYS volume. Not only do I not need either of these area mapped as a drive, but it keeps the majority of USB pen drives from working properly or at all. As soon as I disconnect the drives, the pen drives will work. Is there a hidden script somewhere that I'm missing? Thanks, Kris Gnagey Try changing the "first network drive" setting...

Drive mapping errors, disconnected drives and disappearing rights
Good Morning, Sorry about the long post ... just trying to explain ... I have a NW 6.5 sp3 network. We have just been through a network equipment upgrade from old Cabletron gear to new Cisco Catalyst gear. So overall, our connections in general are much better than before. We have also just changed our ip structure from a 192.168.X.X /16 flat network to a 172.X.X.X /16 network with 10 locations, each on their own subnet, and each having 6 vlans. I include this information incase it may have a relationship to the question ... I have constantly (before & after network...

Web resources about - SelectDirectory and Mapped Drives. - embarcadero.delphi.nativeapi

Bug List
KDE Bugtracking System Home New Browse Search Advanced Search Reports Requests - - Help New Account - Log In [x] Forgot Password Login: Mon Dec ...

Resources last updated: 12/19/2015 12:15:31 AM