Posts Tagged ‘console’

Copy file in LAN network

April 23, 2014 Leave a comment

The mechanism of copying files in a local network is the same when you query data from a database. We get 3 basic steps:

  • Map the network drive – as open connection
  • Copy file – as query data
  • Reject the above drive – as close connection

The first and the last steps are done with net.exe windows program while the second step works with the normal File.Copy functionality.

First step – Map the network
Read more…

Categories: C# Tags: , , ,

Start process without console window

April 22, 2014 Leave a comment

To start a process and get out it’s output stream, you can use ProcessStartInfo like:

var startInfo = new ProcessStartInfo("net.exe", "use \\")
                    UseShellExecute = false,
                    CreateNoWindow = true
var process = Process.Start(startInfo);
Categories: C# Tags: ,
%d bloggers like this: