0

好吧,我有一个在非域平板电脑上的应用程序。

在启动应用程序外壳命令正确的凭据到网络 unc 路径

Shell("net use \\mypath\destloca password username")

这个命令是正确的,并且做了它应该做的事情。

接下来,我打电话

 Dim dir As New IO.DirectoryInfo(loca)

 If Not dir.Exists Then
        MessageBox.Show("There are no records for loca", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification)
        Exit Sub
    End If

这通常可以正常工作,但是每隔一段时间它就会返回 false。网络已连接,但我无法访问域资源。

但是,在我再次 Shell 之后,我能够访问 UNC 路径。

有人有什么想法吗?

4

0 回答 0