This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Convert UNC path to mapped drive in IS script?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 18, 2009
06:56 PM
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
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
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 18, 2009
10:52 PM
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...
If nothing else, you could call GetValidDrivesList, loop over the mapped drives, and compare each to a UNC path of interest...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 19, 2009
01:32 PM
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
I originally thought IS may have some wrapper functions to do that. I will dig some Windows APIs for it ...
Thanks again,
Peter