Tag: 网络共享

Process.Start一个exe文件作为另一个用户在网络共享上

我需要运行位于我的域中的网络驱动器上的exe文件。 驱动器以“M:\”成功连接到我的PC,但我知道Process.Start(字符串,字符串……)在启动位于网络共享上的进程时需要有文件的URL路径。 这是我的代码: string user = “user”; string password = “Qwerty1”; string domain = “nwtraderds”; string open = “file://myshare\dir1\dir2\dir3\test.exe”; string PwString = password; char[] PasswordChars = PwString.ToCharArray(); SecureString Password = new SecureString(); foreach (char c in PasswordChars) Password.AppendChar(c); System.Diagnostics.Process.Start(open, user, Password, domain); 有趣的是: System.Diagnostics.Process.Start(open); 工作良好。 我的想法已经用完了,有人可以帮帮我吗?

Visual Studio 2012网络共享

我使用Parallels在VM上模拟Windows 8。 我将所有开发人员项目存储在Mac的分区上,以简化和连贯。 当我尝试构建运行此网络共享的应用程序(Visual Studio 2012)时,我收到以下编译时错误: Error 1 Error : DEP0700 : Registration of the app failed. Rejecting a request to register from file:///Z:/Users/MY_USER_NAME/Sites/App1/App1/bin/Debug/AppX/AppxManifest.xml because the files are on a network share. Copy the files to the local computer before registering the package. (0x80073cf9) App1 有谁知道如何解决这个问题? 我需要告诉Visual Studio 2012我的网络共享是一个受信任的设备,或者至少让它认为该项目是在本地驱动器中。 无论如何在Windows中创建符号链接? 在Visual Studio 2010中,我解决了此问题,如本网站所述: http : […]

无法从Windows服务访问驱动器映射的网络共享上的文件

我有一个映射到驱动器号的网络共享文件夹,可以从Windows资源管理器,命令提示符以及我的WinForms应用程序中访问,没有问题。 它也可以使用UNC路径从我的Windows服务访问。 但是,当我尝试使用Windows服务中的映射驱动器号访问此网络位置时,访问失败。 Windows服务配置为使用我的个人“登录”帐户凭据,这在上述所有情况下都是相同的。 我是管理员。 许多客户站点使用驱动器号作为网络共享,我无法始终控制它并强制它们指定UNC路径。 我需要能够使用Windows服务中的驱动器号访问网络共享。 我需要做什么来设置我的Windows服务,以便它可以访问映射到驱动器号的网络共享文件夹? 我的Windows服务是用C#编写的。

从C#访问远程目录

我试图从asp.net中的C#程序访问远程网络共享。 我需要的是类似的东西 function download(dirname) { directory = (This is the part I don’t know how to do) for dir in directory: download(dir); for file in directory: copyfile(file); } 我的问题是该目录需要用户名和密码才能访问,我不知道如何提供它们。 谢谢你尽你所能的帮助。