假如有共享:
\\192.168.0.1\d
我知道访问他的密码是guestuser,密码是guest,在程序中怎么访问那个路径呢?
直接访问的话说没有招到路径,需要手动先从网上邻居访问一下(即先输入用户名密码登录),才可以,这个过程能不能用程序完成呢?

解决方案 »

  1.   

    可以用shell "net use \\192.168.0.1\ipc$   Password  /user:username" 
    然后就可以直接访问了,也可以映射成网络驱动器
    Net use  I:  \\192.168.0.1\d$  password  /user:username  下来就可以用I:访问了。
      

  2.   

    不希望使用shell,最好有API等可以实现
      

  3.   

    用API函数ShellExecute()运行net use \\192.168.0.1\ipc$ Password  /user:username,呵呵
      

  4.   

    hehe... viena(晓琴)  交学费了
      

  5.   

    WNetAddConnection2  连接
    WNetCancelConnection2 断开连接
    MSDN中有
      

  6.   

    这个比较全了
    http://expert.csdn.net/Expert/topic/2440/2440801.xml?temp=8.555239E-02
      

  7.   

    shell批处理
    批处理内容如下
    net use \\b\sheet ****(b的密码) /user:administrator(b的用户名)