TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
abinaya r
NA
10
37.5k
run net use command from c# console
Nov 15 2013 12:45 AM
hello all ..
I want to use the "net use" command from the c# console application..
I tried the following but it says wrong user name or bad password.. but the same is working when i execute thru cmd prompt.
please help me..
Process.Start("cmd.exe", "/C" + "net use \\<<myip>> <<mypassword>> /USER:<<myusername>>");
Process.Start("cmd.exe","/C net use \\<<myip>> <<mypassword>> /USER:<<myusername>>");
Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = "/C net use \\<<myip>> <<mypassword>> /USER:<<myusername>>";
process.StartInfo = startInfo;
Process.Start(startInfo);
Can anyone please tell me where I have gone wrong..
Reply
Answers (
8
)
How to create aspx page to support all browsers
How to unlink footer and headers in word using C# ?