JDM0759


Hi all,

I've created a small application (EXE) using VFP9, SP1 and copied it to Windows Vista Business edition and a Windows Vista Ultimate edition machine. This application has a few command buttons to have the user select a mapped network drive path. I have tried GETDIR(), GETFILE(), and even stepped out of the normal VFP function realm and used BrowseForFolder method of the oShell object. Nothing seems to work. Under Computers, the only drives that display are local drives. Mapped network drive letters will not display. I can run this same application under Windows XP Pro, SP2 and it works as expected (Local drives and mapped network drives display).

Does anyone know of a solution to this issue Is this a Windows Vista permission or policy issue or has the structure changed so much that these VFP functions, WSH or Win32API will not work as it did in previous version of Windows when it comes to allowing the user to select a mapped network drive

Thanks in advance for any insight regarding this issue.

James





Re: GETDIR() in Windows Vista only displays Local Drives

AndyKr


I dont't know for sure, but presumably this is yet another consequence of the "improvements" (for "security") in Vista

Have you tried the extended flags Can they help at all







Re: GETDIR() in Windows Vista only displays Local Drives

JDM0759

Hi Andy,

Thank you for your response. I tried all types of combinations of flags for the BrowseForFolder method of the oShell object. Nothing worked...except.... last night, I was messing around with it and found out if I mapped a drive letter to a created network share (not the default network share such as \\SERVER\c$), that the mapped drive letter actually showed up in the dialog. YAHOO! Making some progress. So, as long as there is a Network share (which all of my network installations call for anyway), and you map a drive letter to that share or folder under that share, the mapped drive letter displays in the dialog. So, at least for me, this issue has been resolved. Threw me because I was testing orignally on a Windows XP machine where all the mapped drive letters that I created displayed no matter if I connected to the default share or not. When I tried the same thing in Vista, they would not show. Finally, decided to map a drive letter to an existing share on my network and the drive letter now displays in the dialog.

Hope this helps somebody else out there.

Thanks,

James







Re: GETDIR() in Windows Vista only displays Local Drives

PJB42

I have a variation of this problem--I can get the mapped network drives to appear with no problem...except if I start the app by picking "Run As Asdministartor", suddenly the mapped network drives no longer appear. Any ideas




Re: GETDIR() in Windows Vista only displays Local Drives

PB_UK

Mapped drives are user (rather than PC) specific. Therefore, unless the adminitstrator account also had the drives mapped it would not be able to see them. When you "run as" you are effectively loging on another process - this process would have it's own environment space including mapped drives.

You can easily see this. Log on as the user and start a command (cmd) prompt - you will have all shared drives accessible.

Now use "runas /user:administrator cmd" - the mapped drives are no longer available.

If you need to access the drives as the administrator the administrator account would need to map the drives.

Cheers.