Customer wished to determine the full server path to a mapped network drive
- Microsoft Windows 7 x64
The following steps allow you to determine the path for a mapped network drive from within a PowerBuilder application:
- The full path of a mapped drive is stored in the registry. Let us take M: as an example drive.
- Run regedit and go to HKEY_CURRENT_USER\Network
- Look for RemotePath under M entry which is the full path to the mapped network drive:
This value can be retrieved in a PowerBuilder application using the following Powescript:
string ls_mapped_drive = "M"
RegistryGet("HKEY_CURRENT_USER\Network\" + ls_mapped_drive, "RemotePath", RegString!, ls_remotepath)
where ls_remotepath will contain the remotepath to the drive.