Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Wednesday, March 5, 2014

How can you find out which process is listening on a port on Windows?

C:\> netstat -a -b
(add -n to stop it trying to resolve hostnames, which will make it a lot faster)
Edit: +1 for Dane's recommendation for TCPView. Looks very useful!
-a Displays all connections and listening ports.
-b Displays the executable involved in creating each connection or listening port. In some cases well-known executables host multiple independent components, and in these cases the sequence of components involved in creating the connection or listening port is displayed. In this case the executable name is in [] at the bottom, on top is the component it called, and so forth until TCP/IP was reached. Note that this option can be time-consuming and will fail unless you have sufficient permissions. -n Displays addresses and port numbers in numerical form.

Thursday, February 27, 2014

Kill Processes using Command Prompt in Windows 7 | 8

If your Task Manager gets stuck or unresponsive due to intensive apps and you are not able to kill the particular process. What do u do ? You press ctrl alt delete to open up task manager and find the culprit. But you can kill also multiple processes using command prompt in Windows 7.

Kill Processes using Command Prompt in Windows 7 | 8

To do so, open the Command Prompt in the Administrative privileges mode and run the tasklistcommand, it will show you a list of all the running processes.



To views the processes, type Taskview and hit Enter.

To kill any particular process use the Taskkill command. For example to kill Chrome, run the command as:

Taskkill /IM chrome.exe /F

where /F is used to kill the process forcefully. You can also kill any particular process by using it’s ID, the tasklist command displays the process ID’s as well (you can see the PID column in the screenshot). To kill any process using it’s ID, run the command as:

Taskkill /PID 2704 /F

Now to kill multiple processes simultaneously, run the above command with the PID’s of all the processes followed by spaces

Taskkill /PID 2704 5472 4344 /F

That's it!

Last edited by knightrider™; 11-17-2009 at 11:25 AM.

http://forum.thewindowsclub.com/windows-tips-tutorials-articles/29463-kill-processes-using-command-prompt-windows-7-8-a.html

Friday, March 15, 2013

How to Add or Remove Items from “New” Context Menu in Windows?


In Windows, whenever we right-click on Desktop or in Windows Explorer, we get "New" menu which allows us to create new folder, new shortcut and new files using various known file types. It helps us in creating new files, folders and shortcuts easily and quickly.
Sometimes you may want to remove a few unwanted items from "New" menu to shrink its size or to restrict others from creating new files or shortcuts or you may want to add a few new items to "New" menu such as new file types, etc.
So today in this tutorial, we'll tell you how to add or remove items from "New" menu in Windows. This method will work in all Windows versions:
A. To Add an Item in "New" menu:
1. Type regedit in RUN dialog box and press Enter. It'll open Registry Editor. Now expand "HKEY_CLASSES_ROOT" key.
2. Now look for the file type which you want to add in "New" menu, e.g. for adding MP3 file type look for .MP3 key.
3. Right-click on it and select "New -> Key" and give it name "ShellNew".
4. In right-side pane, right-click and select "New -> String Value". Give it name "NullFile" and press Enter.
5. That's it. You'll immediately get the file type entry in "New" menu.
B. To Remove an Item from "New" menu:
1. Type regedit in RUN dialog box and press Enter. Now expand "HKEY_CLASSES_ROOT" key.
2. Now look for the file type which you want to remove from "New" menu, e.g. for removing MP3 file type look for .MP3 key.
3. Expand it and delete the "ShellNew" key.
4. That's it. The file type will be removed from "New" menu.

Tuesday, November 6, 2012

What are “%1” and “%2” in batch files?

It represents the first command line argument passed to the batch file.
If you run your batch file with:
myfile.bat firstArg secondArg
%1 becomes "firstArg" and %2 becomes "secondArg"
The related shift command shifts the position of arguments one to the left. Running shift once in a batch file will make "%1" value to be the second argument, "%2" becomes the third, and so on. It's useful for processing command line arguments in a loop in the batch file.

http://stackoverflow.com/questions/2309968/what-are-1-and-2-in-batch-files