FILEDIALOG doesn't show Map Network Drives

Tags: #<Tag:0x00007fc0db39abb8>

Hallo,

Is this a limitation or I do something wrong?
I need to pick up a file/path from map drive.

Thank you for any help.

Robert

1 Like

Use the FILE:LongName switch.

1 Like

There is a security context to mapped drives
IOW you will see different mappings when running escalated or not

You can set your manifest to control if your program is escalated or not

https://docs.microsoft.com/en-us/previous-versions/bb756929(v=msdn.10)?redirectedfrom=MSDN#:~:text=<requestedExecutionLevel level%3D"asInvoker|highestAvailable|requireAdministrator" uiAccess%3D"true|false"/

1 Like

Hallo,

I tried but doesn’t work.

Hallo Mark,

I tried but doesn’t work.

Robert, I would check your code again.
I just put together a quick test and tested in C9.1, C11 and C11.1 and mapped drives are showing for me regardless of use FILE:LongName or not.
This is with a standard manifest and running asInvoker. As @MarkGoldberg pointed out, if you run the program asAdministrator instead of asInvoker, then you will not see the mapped drives.
This is running on Windows 10.
In this picture the F: is mapped to a network share.

This is my program:

  PROGRAM

  MAP
  END
loc:FileName                  cstring(256)

  CODE
  FILEDIALOG('No Long Attribute',loc:FileName)
  FILEDIALOG('No Long Attribute',loc:FileName,,FILE:LongName)

This is the manifest:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity
    version="1.0.0.0"
    processorArchitecture="x86"
    name="SoftVelocity.Clarion9.Application"
    type="win32"
  />
  <description>Clarion application.</description>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity
        type="win32"
        name="Microsoft.Windows.Common-Controls"
        version="6.0.0.0"
        processorArchitecture="x86"
        publicKeyToken="6595b64144ccf1df"
        language="*"
      />
    </dependentAssembly>
  </dependency>
  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application> 
      <!--The ID below indicates application support for Windows Vista -->
      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> 
      <!--The ID below indicates application support for Windows 7 -->
      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
      <!--The ID below indicates application support for Windows 8 -->
      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
      <!--The ID below indicates application support for Windows 8-1 -->
      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> 
    </application>
  </compatibility>
</assembly>

Hallo Rick,

Interesting. On my PC and customer doesn’t work.
The same settings like you. (just that the manifest for 11.1 is little bit different at the end)
I have C11.1 with SQL and I run the program asInvoker.

That’s really strange …there must be something else. I will do more tests.
Thank you for the help.