Avatar of Bharat Guru
Bharat Guru
 asked on

Using C# how to map a drive with userid and password

How to make a network map drive using c#
.NET ProgrammingC#

Avatar of undefined
Last Comment
Bharat Guru

8/22/2022 - Mon
Kimputer

just like you would use a cmd with net use \\server\share /user:johndoe password, you could use that information to start a process.
Another method would be to use the windows dlls responsible for network mapping (WNetAddConnection in mpr.dll)
Bharat Guru

ASKER
pls post the sample code
ASKER CERTIFIED SOLUTION
it_saige

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Bharat Guru

ASKER
thanks
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck