cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
peterbi
Level 7

Convert UNC path to mapped drive in IS script?

Hi,

I just converted an IS6.3 project to IS2009 InstallScript type (no MSI). Now I need to convert a UNC path (\\server\path) to the mapped drive letter (the path should have been mapped before installation).

Does anybody know if there is existing function/program that can be called/used in IS script to get the mapped drive letter from the UNC path?

I am using IS2009.


Thanks,
Peter
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

The Windows API function WNetGetConnection (from mpr.dll) will give you the UNC path for a mapped drive, but from memory I don't know a function that goes the other way.

If nothing else, you could call GetValidDrivesList, loop over the mapped drives, and compare each to a UNC path of interest...
0 Kudos
peterbi
Level 7

Thank you Robert.

I originally thought IS may have some wrapper functions to do that. I will dig some Windows APIs for it ...


Thanks again,
Peter
0 Kudos