Mikecool509 0 Newbie Poster

Hi,

I am trying to run a start process command. I want the command prompt process tasklist, to write the output to a file. Normally, in command prrompt, you would type tasklist >> "path"

I got one of my other commands, taskkill to work by typing the following:

System.Diagnostics.Process.Start("taskkill.exe", "-im " & processText.Text & ".exe /f")

However, I can't get the tasklist to work. The taskkill.exe must be in one set of quotation, and then the switched in the other. However, the local target must be encased in quotation, but VB won't accept:

System.Diagnostics.Process.Start("tasklist.exe", " >> "c:\tasks.txt"")

Does anyone have any ideas? Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.