Click here to Skip to main content
15,888,803 members
Home / Discussions / C#
   

C#

 
AnswerRe: what is the correct use of connection to database Pin
_Erik_26-Nov-10 4:53
_Erik_26-Nov-10 4:53 
AnswerRe: what is the correct use of connection to database Pin
OriginalGriff26-Nov-10 5:28
mveOriginalGriff26-Nov-10 5:28 
AnswerRe: what is the correct use of connection to database Pin
RobCroll26-Nov-10 5:40
RobCroll26-Nov-10 5:40 
AnswerRe: what is the correct use of connection to database Pin
PIEBALDconsult26-Nov-10 14:51
mvePIEBALDconsult26-Nov-10 14:51 
AnswerRe: what is the correct use of connection to database Pin
Dr.Walt Fair, PE26-Nov-10 16:30
professionalDr.Walt Fair, PE26-Nov-10 16:30 
AnswerRe: what is the correct use of connection to database Pin
RaviRanjanKr26-Nov-10 17:25
professionalRaviRanjanKr26-Nov-10 17:25 
QuestionRunning PSexec within C# Pin
Philip Lane26-Nov-10 3:15
Philip Lane26-Nov-10 3:15 
Hi C# Guru's,

i have recently written a command line C# app that uses psexec to run Netstat on remote machines and sends the results to a text file, it works ok...ish.

firstly, even though i have set the process to psi.UseShellExecute = false and psi.CreateNoWindow = true it still pops up a command window - any idea how i stop this?

secondly, even though it sends most of the output to the text file it cuts it off short, i have used the below code TNA.
while(p.StandardOutput.EndOfStream == false)
{
sw.Write(p.StandardOutput.ReadToEnd());
p.WaitForExit();
sw.Flush();
}

the bottom part of the output file looks like:
TCP 172.17.134.138:80 172.17.134.133:51076 TIME_WAIT 0
TCP 172.17.134.138:80 172.17.134.133:52450 TIME_WAIT 0
TCP 172.17.134.138:80 1

any ideas on how to get the full output?

Many Thanks,

Phil
AnswerRe: Running PSexec within C# Pin
Luc Pattyn26-Nov-10 3:49
sitebuilderLuc Pattyn26-Nov-10 3:49 
GeneralRe: Running PSexec within C# Pin
Philip Lane30-Nov-10 1:13
Philip Lane30-Nov-10 1:13 
AnswerRe: Running PSexec within C# Pin
Luc Pattyn30-Nov-10 1:43
sitebuilderLuc Pattyn30-Nov-10 1:43 
GeneralRe: Running PSexec within C# Pin
Philip Lane30-Nov-10 3:16
Philip Lane30-Nov-10 3:16 
GeneralRe: Running PSexec within C# Pin
Luc Pattyn30-Nov-10 3:34
sitebuilderLuc Pattyn30-Nov-10 3:34 
GeneralRe: Running PSexec within C# Pin
Philip Lane1-Dec-10 5:19
Philip Lane1-Dec-10 5:19 
QuestionWhat is my IP?? Pin
Sunil G 326-Nov-10 2:37
Sunil G 326-Nov-10 2:37 
AnswerRe: What is my IP?? Pin
harold aptroot26-Nov-10 2:45
harold aptroot26-Nov-10 2:45 
GeneralRe: What is my IP?? Pin
Sunil G 326-Nov-10 2:48
Sunil G 326-Nov-10 2:48 
GeneralRe: What is my IP?? Pin
monstale26-Nov-10 2:52
monstale26-Nov-10 2:52 
GeneralRe: What is my IP?? Pin
harold aptroot26-Nov-10 2:54
harold aptroot26-Nov-10 2:54 
AnswerRe: What is my IP?? Pin
Richard MacCutchan26-Nov-10 2:52
mveRichard MacCutchan26-Nov-10 2:52 
AnswerRe: What is my IP?? Pin
Luc Pattyn26-Nov-10 2:54
sitebuilderLuc Pattyn26-Nov-10 2:54 
GeneralRe: What is my IP?? Pin
RobK4104-Jun-11 19:20
RobK4104-Jun-11 19:20 
AnswerRe: What is my IP?? Pin
Luc Pattyn5-Jun-11 0:59
sitebuilderLuc Pattyn5-Jun-11 0:59 
AnswerRe: What is my IP?? Pin
Bernhard Hiller26-Nov-10 3:50
Bernhard Hiller26-Nov-10 3:50 
QuestionSerialPort Fire DataRecevie Pin
I Believe In GOD26-Nov-10 1:15
I Believe In GOD26-Nov-10 1:15 
AnswerRe: SerialPort Fire DataRecevie Pin
JF201526-Nov-10 1:40
JF201526-Nov-10 1:40 

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.