Click here to Skip to main content
15,878,809 members
Home / Discussions / C#
   

C#

 
QuestionInsert Multi Rows from Datagridview to another datagridview Pin
haipt23220-Feb-14 23:03
haipt23220-Feb-14 23:03 
AnswerRe: Insert Multi Rows from Datagridview to another datagridview Pin
Richard MacCutchan20-Feb-14 23:27
mveRichard MacCutchan20-Feb-14 23:27 
GeneralRe: Insert Multi Rows from Datagridview to another datagridview Pin
haipt23221-Feb-14 0:08
haipt23221-Feb-14 0:08 
SuggestionRe: Insert Multi Rows from Datagridview to another datagridview Pin
Eddy Vluggen21-Feb-14 0:28
professionalEddy Vluggen21-Feb-14 0:28 
GeneralRe: Insert Multi Rows from Datagridview to another datagridview Pin
Richard MacCutchan21-Feb-14 0:30
mveRichard MacCutchan21-Feb-14 0:30 
QuestionHow do i load a XML data to a Combobox? Pin
Member 1061426220-Feb-14 22:24
Member 1061426220-Feb-14 22:24 
AnswerRe: How do i load a XML data to a Combobox? Pin
Wayne Gaylard20-Feb-14 22:37
professionalWayne Gaylard20-Feb-14 22:37 
QuestionThreading and system.diagnostics Pin
Syed Ata-Ur-Rehman20-Feb-14 9:56
Syed Ata-Ur-Rehman20-Feb-14 9:56 
Hi Every body.

I have a scenario in which I have to send series of commands to command prompt. I have achieved It almost using system.diagnostics.Process but when I execute my program in windows XP, it does not behave propely as it behaves in Windows 7.
I am trying to open other applications in interactive mode.Honestly I am able to do it in windows 7 but in win XP process are just started and lives in background. as soon as I close the console they begins to launch one by one. There is something missing in my code which is not letting them launch(Problem is Only in XP).

Following are the steps I'm doing in C# code.

Step #1: Opening command prompt

C#
using (Process process = new Process())
    {
        process.StartInfo.UseShellExecute = false;
        process.StartInfo.RedirectStandardOutput = true;
        process.StartInfo.RedirectStandardError = true;
        process.StartInfo.WorkingDirectory = @"C:\";
        process.StartInfo.FileName = Path.Combine(Environment.SystemDirectory, "cmd.exe");

        // Redirects the standard input so that commands can be sent to the shell.
        process.StartInfo.RedirectStandardInput = true;
        // Runs the specified command and exits the shell immediately.
        //process.StartInfo.Arguments = @"/c ""dir""";

        process.OutputDataReceived += ProcessOutputDataHandler;
        process.ErrorDataReceived += ProcessErrorDataHandler;

        process.Start();
        process.BeginOutputReadLine();
        process.BeginErrorReadLine();

        // Send a directory command and an exit command to the shell

    }


Step 2: Giving commands one by one by using standard input.


I need you people to correct me if I am going in wrong direction.
Please help me identify the problem that who is blocking programs and why they are launching after closing console
AnswerRe: Threading and system.diagnostics Pin
Dave Kreskowiak20-Feb-14 13:15
mveDave Kreskowiak20-Feb-14 13:15 
AnswerRe: Threading and system.diagnostics Pin
Bernhard Hiller20-Feb-14 22:12
Bernhard Hiller20-Feb-14 22:12 
QuestionDll libraries Pin
Blubbo20-Feb-14 3:37
Blubbo20-Feb-14 3:37 
AnswerRe: Dll libraries Pin
Alan N20-Feb-14 6:53
Alan N20-Feb-14 6:53 
AnswerRe: Dll libraries Pin
Richard MacCutchan20-Feb-14 6:55
mveRichard MacCutchan20-Feb-14 6:55 
QuestionDShow.Net Problem With Opening Camera Pin
BBatts20-Feb-14 2:59
BBatts20-Feb-14 2:59 
AnswerRe: DShow.Net Problem With Opening Camera Pin
Simon_Whale20-Feb-14 3:30
Simon_Whale20-Feb-14 3:30 
GeneralRe: DShow.Net Problem With Opening Camera Pin
BBatts20-Feb-14 3:56
BBatts20-Feb-14 3:56 
GeneralRe: DShow.Net Problem With Opening Camera Pin
Simon_Whale20-Feb-14 4:06
Simon_Whale20-Feb-14 4:06 
GeneralRe: DShow.Net Problem With Opening Camera Pin
BBatts20-Feb-14 4:25
BBatts20-Feb-14 4:25 
AnswerRe: DShow.Net Problem With Opening Camera Pin
Eddy Vluggen20-Feb-14 8:06
professionalEddy Vluggen20-Feb-14 8:06 
GeneralRe: DShow.Net Problem With Opening Camera Pin
BBatts20-Feb-14 8:08
BBatts20-Feb-14 8:08 
QuestionJoystick Driver Project Pin
uddajay20-Feb-14 2:51
uddajay20-Feb-14 2:51 
AnswerRe: Joystick Driver Project Pin
Richard MacCutchan20-Feb-14 2:55
mveRichard MacCutchan20-Feb-14 2:55 
AnswerRe: Joystick Driver Project Pin
Dave Kreskowiak20-Feb-14 3:32
mveDave Kreskowiak20-Feb-14 3:32 
QuestionHow to read view permission groups from DFS link objects? Pin
RolandZ19-Feb-14 23:15
RolandZ19-Feb-14 23:15 
Questionpublished c# application cannot start Pin
emma.sun.sts19-Feb-14 20:04
emma.sun.sts19-Feb-14 20:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.