LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

get mapped drive information in LV

Solved!
Go to solution

Is there a way to output the full server name for a mapped network drive?

i.e. go from the mapped drive letter R:\ and have it output the full path \\Mapped_Drive1

 

drive.png

 

Thank you in advance...

maat
LV2019
0 Kudos
Message 1 of 5
(2,921 Views)
Solution
Accepted by topic author maat

There is no direct way of doing that. You can, however, do it, using a Windows API call to the WNetGetConnection function. See attached example. The buffer for the UNC path was arbitrarily set to be 100 characters.

Message 2 of 5
(2,913 Views)

Exactly what I was looking for, thanks again!

maat
LV2019
0 Kudos
Message 3 of 5
(2,910 Views)

I attached the final VI in case it helps anyone.

maat
LV2019
Message 4 of 5
(2,903 Views)

Works great, thank you!

0 Kudos
Message 5 of 5
(2,831 Views)