Click here to Skip to main content
15,562,816 members
Home / Discussions / C#
   

C#

 
Questionlog into a website Pin
DanYELL7-Apr-12 9:15
DanYELL7-Apr-12 9:15 
AnswerRe: log into a website Pin
Not Active7-Apr-12 12:08
mentorNot Active7-Apr-12 12:08 
GeneralRe: log into a website Pin
DanYELL7-Apr-12 14:47
DanYELL7-Apr-12 14:47 
GeneralRe: log into a website Pin
DanYELL9-Apr-12 4:46
DanYELL9-Apr-12 4:46 
QuestionGetting values from tasklist.exe /v Pin
CCodeNewbie7-Apr-12 7:24
CCodeNewbie7-Apr-12 7:24 
AnswerRe: Getting values from tasklist.exe /v Pin
Richard Andrew x647-Apr-12 7:42
professionalRichard Andrew x647-Apr-12 7:42 
GeneralRe: Getting values from tasklist.exe /v Pin
CCodeNewbie7-Apr-12 7:55
CCodeNewbie7-Apr-12 7:55 
AnswerRe: Getting values from tasklist.exe /v Pin
Alan N7-Apr-12 10:55
Alan N7-Apr-12 10:55 
Try opening a command window and type tasklist /? to get all the options.

You'll find that there is /NH to remove the column headers and /FO CSV to dump the output in comma separated value format.

The output from "tasklist /v /nh /fo csv" will be something like this:

"System Idle Process","0","Console","0","28 K","Running","NT AUTHORITY\SYSTEM","71:33:38","N/A"
"System","4","Console","0","256 K","Running","NT AUTHORITY\SYSTEM","0:24:32","N/A"
"smss.exe","1680","Console","0","924 K","Running","NT AUTHORITY\SYSTEM","0:00:00","N/A"


It will be advantageous to capture the output as lines rather than one long string. For this use ReadLine in a loop instead of ReadToEnd.

The final step is subdivision of each line at the comma delimiters to get the individual fields (use the String.Split method).

Alan
AnswerRe: Getting values from tasklist.exe /v Pin
Richard Andrew x647-Apr-12 11:23
professionalRichard Andrew x647-Apr-12 11:23 
GeneralRe: Getting values from tasklist.exe /v Pin
CCodeNewbie7-Apr-12 12:18
CCodeNewbie7-Apr-12 12:18 
GeneralRe: Getting values from tasklist.exe /v Pin
Luc Pattyn7-Apr-12 12:35
sitebuilderLuc Pattyn7-Apr-12 12:35 
GeneralRe: Getting values from tasklist.exe /v Pin
CCodeNewbie7-Apr-12 12:55
CCodeNewbie7-Apr-12 12:55 
AnswerRe: Getting values from tasklist.exe /v Pin
Luc Pattyn7-Apr-12 13:56
sitebuilderLuc Pattyn7-Apr-12 13:56 
GeneralRe: Getting values from tasklist.exe /v Pin
CCodeNewbie7-Apr-12 15:01
CCodeNewbie7-Apr-12 15:01 
GeneralRe: Getting values from tasklist.exe /v Pin
Eddy Vluggen8-Apr-12 9:53
professionalEddy Vluggen8-Apr-12 9:53 
GeneralRe: Getting values from tasklist.exe /v Pin
CCodeNewbie8-Apr-12 10:06
CCodeNewbie8-Apr-12 10:06 
GeneralRe: Getting values from tasklist.exe /v Pin
CCodeNewbie8-Apr-12 10:11
CCodeNewbie8-Apr-12 10:11 
GeneralRe: Getting values from tasklist.exe /v - update Pin
CCodeNewbie8-Apr-12 0:24
CCodeNewbie8-Apr-12 0:24 
Questionprogrammatically log into yahoo or godaddy Pin
DanYELL6-Apr-12 17:55
DanYELL6-Apr-12 17:55 
Questionuse select statement inside insert statement in ado.net Pin
mrx1006-Apr-12 13:22
mrx1006-Apr-12 13:22 
AnswerRe: use select statement inside insert statement in ado.net Pin
PIEBALDconsult6-Apr-12 13:55
professionalPIEBALDconsult6-Apr-12 13:55 
AnswerRe: use select statement inside insert statement in ado.net Pin
JOAT-MON6-Apr-12 15:07
JOAT-MON6-Apr-12 15:07 
AnswerRe: use select statement inside insert statement in ado.net Pin
Luc Pattyn6-Apr-12 16:31
sitebuilderLuc Pattyn6-Apr-12 16:31 
QuestionCode Insertion Syntax Query Pin
mauricemcse6-Apr-12 7:39
mauricemcse6-Apr-12 7:39 
AnswerRe: Code Insertion Syntax Query Pin
Wes Aday6-Apr-12 7:59
professionalWes Aday6-Apr-12 7:59 

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.