如何复制文件到虚拟驱动器,需要验证登陆名和密码 远程服务器共享文件夹在本地映射了一个驱动器后,需要把本地的文件复制进去,并且需要验证用户名密码才可以登陆那个共享文件夹谁知道怎么做? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 string wl= "net use \\192.168.1.1\共享名 密码 /user:登录用户名"; Process p = new Process(); p.StartInfo.FileName = "cmd.exe"; p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardInput = true; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.RedirectStandardError = true; p.StartInfo.CreateNoWindow = true; p.Start(); p.StandardInput.WriteLine(wl); p.StandardInput.WriteLine("exit"); p.Close(); 然后开始复制到 上面的共享文件夹下 映射网络驱动器--------》http://topic.csdn.net/t/20050810/07/4199512.html用API实现的 你已经用net use 连接上机器了为什么要映射驱动器??直接访问就可以了你也可以用WMI获得共享目录~~~~~ |ZYCWPF| 花了一个多星期还是搞不定WCF的双工,有示例下载 谢谢 三层架构 Datagridview的回车功能 如何在XtraGrid.Gridview中获取数据绑定到c1Chart中.在线等大侠 c# 换肤方案 VS2005 WinForm 怎么逐像素移动控件? 前台显示不了回车和空格 关于第三方开发平台,言者有分! 用C#怎么实现文件上传?谢谢 在C#中如何使用Replace 用C#2.0做处理串口通信 c#如何得到数据库中所有表名
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true; p.Start();
p.StandardInput.WriteLine(wl); p.StandardInput.WriteLine("exit"); p.Close(); 然后开始复制到 上面的共享文件夹下
--------》
http://topic.csdn.net/t/20050810/07/4199512.html
用API实现的
为什么要映射驱动器??直接访问就可以了你也可以用WMI获得共享目录~~~~~