Computer Science Canada Not exiting at eof |
Author: | Thuged_Out_G [ Thu Aug 10, 2006 7:13 pm ] | ||
Post subject: | Not exiting at eof | ||
Can someone please explain why that loop isnt stopping at eof, it just continually reads the file, over and over. |
Author: | Thuged_Out_G [ Thu Aug 10, 2006 9:16 pm ] | ||
Post subject: | |||
Ok, got the loop issue figured out ... another problem arrises, which im unsure as to the best way to deal with.
That is my code, my problem is after listProcess is called, im left with a command prompt, the same issue after I kill a process. Does anyone know of a way I could close each command prompt after the the command is executed. |
Author: | NikG [ Thu Aug 10, 2006 10:25 pm ] |
Post subject: | |
Thuged_Out_G wrote: if not Sys.Exec ("C:\\WINNT\\system32\\cmd.exe /k tasklist /svc >> C:\\test1.txt") then
Use the /c parameter instead of the /k. That should terminate the window after it's done doing what it supposed to.
... (Just a note, I found that by typing in "help cmd" into the command prompt.) |
Author: | Thuged_Out_G [ Fri Aug 11, 2006 7:19 am ] | ||
Post subject: | |||
Is what I found, i'll try the /c those when I get home .. thanks! Also, I was told on a website article that using the above ntsd command I could kill any process, Although try to kill certain processes always comes back with a access denied message. |