设置用户名和密码以登录到映射的networkk驱动器 [英] set username and password for login to a maped networkk drive

查看:131
本文介绍了设置用户名和密码以登录到映射的networkk驱动器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我有一个问题.. :(
我每次都有一个映射的网络驱动器.当我想登录到我的映射网络驱动器时.它要我设置用户名和密码.
如何通过代码设置用于登录网络驱动器的用户名和密码????

Hi I have a question.. :(
I have a maped network drive every time . when I want to log in to my maped network drive. it wants me to set username and password.
How can I set username and password for login to a network drive by code????

推荐答案

在CodeProject上查看此文章,了解如何从代码映射网络驱动器,
地图网络驱动器(API) [
See this article here on CodeProject on how to Map Network Drives from code,
Map Network Drive (API)[^]

It is in C#, but you should be able to understand it and convert to VB.net quite easily.

In general though, to access network resources and read/write files direct from shares etc. You need to use the NetworkCredential class.


这篇关于设置用户名和密码以登录到映射的networkk驱动器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆