Hey everybody,
I once again need some help.
I'm using the .net Compact Framework and the programming language C# to develop for mobile devices that are running WinCE 5.0.
What I want to accomplish is to programmatically mount a network drive. To do so, the app runs the following code in a background thread:
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "net";
startInfo.UseShellExecute = false;
startInfo.Arguments = @"use logs \\server\logs /user:dom\uname /password:pw";
Process p = Process.Start(startInfo);
p.WaitForExit(5000);
Now my problem is, that this code will display a console in the foreground and writes the command to it and the answer from the command as well. Also, the console won't disappear anymore.
The parameter 'UseShellExecute' doesn't seem to show any effect.
I've read about the parameter 'CreateNoWindow', but it doesn't exist in the compact framework.
So folks, is there a possibility to run net-commands in the background, the user shouldn't notice and certainly not see the command including the password in plain text.
I hope you get the idea.
Many thanks in advance
Toby