Welcome to the web's most helpful Online Free computer tips and tricks website. This site contains all Latest and Cool Computer tricks as well as some Internet Tricks, Registry tricks, Orkut tricks, Windows customize and Optimization tricks, Computer Tweaks. Solve your computer problems by browsing the website for related Computer solution. All tips work well in both Windows XP as well as windows vista or win 7 operating systems. Need some Computer Help? Then this website suites your must need. These windows and internet Hacks Tricks are safe and free from any Spy ware. Learn All Basic and Advanced computer tips and tricks and be a computer master. All the computer tips at Hack2011 are very interesting and are mainly meant for education purpose. Visit my new Computer Tips Blog and leave your comments and suggestions there. Enjoy your stay and read all the articles posted here.


Save a List of Running Processes to a Text File in Windows

Starting cmd from the Search box in Windows 7If you want to view a list of processes running on your computer and you are either unable to open Task Manager or you want to be able to print the list, we have a simple procedure that allows you to generate a list of running processes and write it to a text file. The list contains the PID (process ID) and memory usage for each process.
This procedure also works in Windows XP and Windows Vista.

To generate a list of running processes, open the Command Prompt as Administrator. To do this in Windows 7 or Windows Vista, enter “cmd” (without the quotes) in the Search Programs and Files box on the Start menu. The cmd.exe program should automatically be highlighted in the Programs section of the results. Press Ctrl + Shift + Enter to open cmd.exe as Administrator.

You can also open the Command Prompt as Administrator in Windows 7 or Windows Vista by opening All Programs | Accessories on the Start menu. Right-click on the Command Prompt shortcut and select Run as administrator from the popup menu.


Starting Command Prompt from Accessories
If you are using Windows XP, open All Programs | Accessories on the Start menu. Right-click on the Command Prompt shortcut and select Run as from the popup menu.
Selecting Run as for cmd in Windows XP
The Run As dialog box displays. Select the The following user radio button and select Administrator from the User name drop-down list, if it is not already selected. Enter the Administrator password in the Password edit box. Click OK.
Run As dialog box in Windows XP
If you are using Windows 7 and the User Account Control dialog box displays, click Yes to continue.
NOTE: You may not see this dialog box, depending on your User Account Control.
User Account Control for cmd
To see the list of running processes directly in the Command Prompt window, enter the following line at the prompt and press Enter.
tasklist
A nice table with headings displays all the running processes.
Entering the tasklist command
To write the table of running processes to a text file, enter the following line at the prompt and press Enter.
tasklist > c:\processes_list.txt
NOTE: The above command saves a file called processes_list.txt to C:. If you want to save the file with a different name to a different location, enter the full path of the desired location and enter a different file name.
Writing the results of tasklist to a text file
In our example, the processes_list.txt file is written to the root of the C: drive.
processes_list.txt file created
The table of running processes is available in text file format, allowing you to print the information from a text editor, such as Notepad.
processes_list.txt file open in notepad
You can also generate a list of running services in the same manner. To do this, enter the following line at the prompt and press Enter.
tasklist/svc > c:\services_list.txt
NOTE: Again, you can change the path and filename as desired.
Generating a list of services
A table displays the list of services with their associated PIDs.
NOTE: This is a good way to find out what services are being hosted by the various instances of the svchost.exe file. Svchost.exe is a process that hosts other services to perform various functions and there can be multiple instances of svchost.exe running at one time. See our post, Svchost.exe explained and demystified, for more information about svchost.exe.
services_list.txt file
This procedure can come in handy if you need to kill a process and a virus is preventing Task Manager from opening. You can generate the list of running processes in the command prompt, get the PID for the process you want to kill, and then use the taskkill command to kill the process. Enter the following line on the command prompt for more information on how to use the taskkill command.
taskkill /?
Also, see our post, Quickly Kill Non-Responsive Programs in Windows 7 and Vista, for an easy way to kill non-responsive processes. The article was written about Windows 7 and Vista, but the taskkill command is also available in Windows XP.

No comments:

Post a Comment