Thank you bruintje,
my code looks now as follows:
---
Process MS = new Process();
int tmpErrIntCode = 0;
string tmpErrCatched = "";
try
{
//Process MS = new Process();
MS = Process.Start("NET", "USE \\\\" + tmpMyComputer + " /user:" + tmpMyUserID + " " + tmpMyPassword);
//now you can lookup something that will be of use when looking at the autocomplete
//MS.
//you can read its error output or the exit state
tmpErrIntCode = MS.ExitCode; // <= result = 2 ; where to find exit state?
}
catch (Exception ex)
{
//do something here
tmpErrCatched = ex.ToString(); // is not entered
}
finally
{
//
}
---
Executing the equivalent Net-Use-command leads to error 1385.
I'ld expect this error..
Main Topics
Browse All Topics





by: bruintjePosted on 2006-07-03 at 00:55:18ID: 17029473
Hi HStrix,
----------
if you use something like
using System.Diagnostics;
try
{
Process MS = new Process();
MS = Process.Start("NET", "USE \\\\" + tmpMyComputer + " /user:" + tmpMyUserID + " " + tmpMyPassword);
//now you can lookup something that will be of use when looking at the autocomplete
//MS.
//you can read its error output or the exit state
}
catch (Exception ex)
{
//do something here
}
finally
{
}
wrote this right in the box here so there could be something missing in syntax
----------
bruintje
share what you know, learn what you don't