We have windows 2003
server Pc named pc2 in which local drives are shared with different names. For example local drive E is shared with name 'datapath' so that all users in network
access that drive using network path '\\pc2\datapath\'
. We need VB.net code to convert local path to shared UNC path
i.e if we input 'E:\netuse',code must return '\\pc2\datapath\netuse'
.
Is there any way to do this in VB.net
?
EDIT: Drive E is not mapped,it is just shared
Just created a small app which seems to work.
It takes a textbox with a non-unc value and converts it,then sets a label
Remember to include the following namespaces if you haven't already;
This is the method that does all the work;
Declare this function;
Call the code from a button click;
Hope this helps.
This code worked very well