How to find the command line arguments a program started with in Windows

  • November 23, 2006
  • Read 68,824 times
 

Watch the tutorial's companion video here!

Some programs provide the ability to add arguments when executing it in order to change a particular behavior or modify how the program operates. As an example lets look at the command line argument for Firefox called safe-mode. If you start Firefox with the command line firefox.exe -safe-mode Firefox will start without any extensions or themes. As you can see adding a command line argument to the program's executable changed its default behavior.

Now that we understand what command line arguments are, how do we determine what command line arguments a process was started with when we personally did not launch them? This guide will explain how to determine this information for all running processes on your computer. To accomplish this, we will use the Process Explorer utility created by Sysinternals.

To begin, you need to download Process Explorer from the following site:

Process Explorer Download Link

Download the file and save it to your hard drive. When it has finished downloading, extract the file and it will create a Process Explorer folder. Double-click on this folder and then double-click on the procexp.exe file to start the program. If this is your first time running the program, it will display a license agreement that you should agree to in order to start the program. When it is finished loading you will be presented with a screen containing all the running processes on your computer similar to the figure below.

 

Process Explorer
Process Explorer

 

The Process Explorer window is now open and listing all the processes currently running on your computer. In order to see the command line arguments each of these programs were started with we need to add an additional column to the display. To do this click on the View menu and then click on the Select Columns option. This will bring up a screen similar to the one below where you can select the columns of information that will be shown about each process in the main display.


Process Explorer - Select Columns Screen

 

Put a checkmark in the Command Line checkbox and then press the OK button. You will now be back at the main Process Explorer window, but now with an additional column. In order to see the command line you may have to maximize the screen and increase the width of the Command Line column seen as illustrated below.



Command Line arguments screen in Process Explorer

 

Using the information shown in these columns, you can now determine what arguments the various processes were started with and diagnose the function of the programs further.

Users who read this also read:

  • How to delete or rename files and folders that are in use or locked in Windows Image
    How to delete or rename files and folders that are in use or locked in Windows

    One of the more frustrating experiences when using a computer is when you want to delete or rename a file or folder in Windows, but get an error stating that it is open, shared, in use, or locked by a program currently using it.

  • How to Shrink and Extend NTFS Volumes in Windows Image
    How to Shrink and Extend NTFS Volumes in Windows

    In the past when you needed to resize a partition in Windows you had to use a 3rd party utility such as Partition Magic, Disk Director, or open source utilities such as Gparted and Ranish Partition Manager. These 3rd party programs, though, are no longer needed when using Windows as it has partition, or volume, resizing functionality built directly into the Windows Disk Management utility.

  • How to determine what services are running under  a SVCHOST.EXE process Image
    How to determine what services are running under a SVCHOST.EXE process

    A very common question we see here at Bleeping Computer involves people concerned that there are too many SVCHOST.EXE processes running on their computer. The confusion typically stems from a lack of knowledge about SVCHOST.EXE, its purpose, and Windows services in general. This tutorial will clear up this confusion and provide information as to what these processes are and how to find out more ...

  • How to use the Windows Snipping Tool Image
    How to use the Windows Snipping Tool

    The Snipping Tool is a program that is part of Windows Vista, Windows 7, and Window 8. Snipping Tool allows you to take selections of your windows or desktop and save them as snips, or screen shots, on your computer. In the past if you wanted a full featured screen shot program you needed to spend some money to purchase a commercial one. If you needed basic screen shot capability, past versions of ...

  • Using Windows ReadyBoost to Increase Performance in Windows 8, Windows 7, and Windows Vista Image
    Using Windows ReadyBoost to Increase Performance in Windows 8, Windows 7, and Windows Vista

    Have you ever had an experience where you are using a lot of programs in Windows, or a really memory intensive one, and notice that your hard drive activity light is going nuts, there is lots of noise from the hard drive, and your computer is crawling? This is called disk thrashing and it is when you have run out of physical RAM and instead Windows is using a file on your hard drive to act as a ...

 

Comments:

blog comments powered by Disqus
search tutorials

Login

Remember Me
Sign in anonymously