i'm trying to run programs from within c# code, with different username (runAs).
if i'm running it directly, like this:
Expand|Select|Wrap|Line Numbers
- Process.Start("c:",username,password,domain);
i managed to bypass it by:
Expand|Select|Wrap|Line Numbers
- Proccess pr = new Proccess();
- pr.UserName=username;
- pr.Password=password;
- pr.Domain=domain;
- pr.FileName="cmd";
- pr.Arguments="start /c c:";
- pr.UseShellExecute=false;
- - or -
- pr.FileName="c:\progra~1\intern~1\iexplore";
- pr.Arguments="http:\\..";
the problem is opening directory located in other computer (with iexplorer), opening as shared folder and changes i make there won't appear until i refresh the page.
the first one, with cmd, also causing some problems in some scenarios.
can someone help me resolve the problem so i can open everything the ordinary way?