DFSRemove



Declare Function NetDfsRemove Lib "netapi32" _
(ByVal DFSEntryPath As String, _
ByVal ServerName As String, _
ByVal ShareName As String) As Long

DFSEntryPath = "\\tim\testdfs\xxx"
' Full path of DFS link, including server and root share

ServerName = "TIM"
' contrary To docu without leading \\!

ShareName = "newfolder"
' Without Server or leading nor tailing \

x = Module1.NetDfsRemove(StrConv(DFSEntryPath, vbUnicode), _
StrConv(ServerName, vbUnicode), StrConv(ShareName, vbUnicode))
' x=0 if everything went OK


(dfsremove.html)- by Paolo Puglisi - Modifica del 25/3/2019