Every once in awhile I like to run the tasklist and get an output file.
Can I automate this and place it in my Administrator folder?
Here is what currently do.
Run
Cmd
tasklist /svc >"h:\my Documents\ed\tasklist_01.doc"
exit
This produces a document which shows all my current processes.
I have tried writing a batch program to run this but I just can not make it work.
Can anyone tell me how I do this?
- Follow via:
- RSS
- Email Alert
Question
0
Votes
Answers (2)
0
Votes
Batch File
Try something like this:
:::::Begin file::::::::::
@echo off
h:
cd\
cd "h:\my documents\ed\"
tasklist /svc >"h:\my documents\ed\tasklist_01.doc"
::::End File:::::
It's really simple, but it should work. Just cut and paste the above into a txt and rename with a .cmd extension.
:::::Begin file::::::::::
@echo off
h:
cd\
cd "h:\my documents\ed\"
tasklist /svc >"h:\my documents\ed\tasklist_01.doc"
::::End File:::::
It's really simple, but it should work. Just cut and paste the above into a txt and rename with a .cmd extension.
11th Jan 2007
Replies
Ok I did what you suggested. However it gives the same result as my previous attempts.
Here is what is gives instead of the proper information. As you can see it is not a list from taskliskt.
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
H:\My Documents\Ed>
What happens is one command opens then a second one.
The first window has the following in it
'Run' is not recognized as an internal or external command,
operable program or batch file.
Now the second window has
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
H:\My Documents\Ed>
Which is copied to the tasklist_01.doc
Yes it seems like it should be easy but I just do not understand what I am missing. It seems like just never see the command tasklist.
Just figured out what the problem what the problem.
I needed to write it as tasklist.exe not just tasklist.
Tasklist will work in
Run
cmd
tasklist /svc >"h:\my documents\ed\tasklist_0r.doc"
However it must have the extension exe to run from a program.
Thank for your reply
Here is what is gives instead of the proper information. As you can see it is not a list from taskliskt.
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
H:\My Documents\Ed>
What happens is one command opens then a second one.
The first window has the following in it
'Run' is not recognized as an internal or external command,
operable program or batch file.
Now the second window has
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
H:\My Documents\Ed>
Which is copied to the tasklist_01.doc
Yes it seems like it should be easy but I just do not understand what I am missing. It seems like just never see the command tasklist.
Just figured out what the problem what the problem.
I needed to write it as tasklist.exe not just tasklist.
Tasklist will work in
Run
cmd
tasklist /svc >"h:\my documents\ed\tasklist_0r.doc"
However it must have the extension exe to run from a program.
Thank for your reply
jenueheightz
11th Jan 2007
0
Votes
I got this one to work
I took sbrown95's text and changed it to
c:
cd\
tasklist /svc >"c:\temp\tasklist_01.txt"
saved that as "tasklist.bat", then added it to my scheduled tasks folder. It worked. Cool! For some reason with the @echo off command it wasn't working. It would create an empty file.
c:
cd\
tasklist /svc >"c:\temp\tasklist_01.txt"
saved that as "tasklist.bat", then added it to my scheduled tasks folder. It worked. Cool! For some reason with the @echo off command it wasn't working. It would create an empty file.
11th Jan 2007

































