Raymond.CC Blog
  • Home
  • Forum
  • Giveaway
  • X-Ray 2.0
  • Contact
  • About
  • I’m Feeling Lucky
Search the site...
You are here: Home » Windows » Find Out the Command Line Location When Windows Opens a Process

Find Out the Command Line Location When Windows Opens a Process

Updated by HAL9000 - 3 months ago - Windows
8
  • Like
  • +1
  • Tweet
  • Printer Friendly and PDF
command line shortcut icon

When you visit a lot of pages on the web looking for tips, tweaks and repairs, very often you will see people using command line arguments that you didn’t realize existed for that particular function or tool. Have you ever wondered how they find out what these shortcuts and command line arguments are? Do they actually find out themselves or do they look in the Microsoft Knowledge Base or search Google?

A simple example is in the article for how to open the Safely Remove Hardware dialog box when the icon is not located it the system tray. One way to fix it is run the command line “rundll32 shell32.dll,Control_RunDLL hotplug.dll” and the Safely Remove Hardware box will appear. As you can see, it’s a complex command and not as simple as running a single executable. It involves several different commands but how would you figure out something like this yourself?

Finding out commands and arguments is very easy when you know how to do it and where to look. Here’s a couple of possible ways.

Using Process Explorer

A popular program called Process Explorer from Sysinternals is a task management tool which can reveal detailed information about which handles and DLL processes have opened or loaded. Process Explorer looks like a slightly fancier version of the Windows Task Manager, but it’s a very capable tool and can be used for tracking down all sorts of process related problems and digs deep into what resources a program actually uses.

Here is how to find out the command line for the Safely Remove Hardware dialog box. Obviously you can substitute the Safely Remove Hardware example for anything you choose, the principle is exactly the same.

1. Download Process Explorer and run it. One option you might like to change is the time the program highlights a new process to make it easier to spot. Go to Options -> Difference Highlight Duration… and change the seconds value to 3 or 5 etc.

Different Highlight Duration

2. Open the Safely Remove Hardware dialog box by right clicking on the tray icon and selecting “Safely Remove Hardware”. Quickly look in the Process Explorer window and you’ll see a new process in the list that has turned green, this should be the process for Safely Remove.

Process Explorer

3. The simplest way to see the command line in use is just to hover the mouse over the process. This will show a tooltip which will also give the command line used. As you can see, this shows where the full rundll32 command comes from.

Process Explorer Command Line

4. If you wish to have access the the command line arguments so you can copy and paste elsewhere, double click on the process to bring up the Properties dialog. Look in the Command line box and the command can be selected and copied.

Process Properties

As another simple example, when you create a backup using the built in System Imaging feature in Windows Vista, 7 and 8, it launches a tool called sdclt.exe. If you run this executable on its own though, you will only end up at the Control Panel backup window, not the imaging tool itself. With Process Explorer open, open the Create system image tool and you’ll find an extra argument is shown…

sdclt.exe BLBBACKUPWIZARD

As you can see, a /BLBBACKUPWIZARD argument is appended to sdclt.exe which takes you straight to the system imaging tool and not just to the Control Panel applet.

The great thing about finding these command line arguments is they can be used in other places such as the Command Prompt, in your own batch files and scripts, and also in desktop shortcuts. Using this method you can find out just about any shortcuts you want such as Computer Management, System Properties, Device Manager and almost anything else. Process Explorer can be used in Windows XP and above.

Download Process Explorer


Using Windows Task Manager

If you’re a user of Windows Vista or above, there is also an option in the Windows Task Manager to show the command line of running processes. This can be used effectively but obviously doesn’t have things like new process highlighting and the ability to copy the command line to the clipboard.

Task Manager Command Line

To access this extra column simply go to View -> Select Columns… and tick Command Line near the bottom. You should now be able to see the commands and any arguments in use by the process in a new column.

Didn't find what you want? The links below could help:

Measure Time Taken to Complete a Batch File or Command Line ExecutionMeasure Time Taken to Complete a Batch File or Command Line ExecutionDisable UAC for Specific Software in Windows 7 with UAC Trust ShortcutDisable UAC for Specific Software in Windows 7 with UAC Trust ShortcutSending Email Using Command Line Useful for Downtime Alert NotificationSending Email Using Command Line Useful for Downtime Alert NotificationIntegrate and Replace the Slow Windows 7 Default Search with Agent RansackIntegrate and Replace the Slow Windows 7 Default Search with Agent Ransack

8 comments on “Find Out the Command Line Location When Windows Opens a Process”

  1. DeKaN says:
    4 years ago

    Wah, macam itu ka? Ic2.. Thank you.

    Reply
  2. Luccio says:
    5 years ago

    Really smart trick.
    Thanks, Ray

    Reply
  3. Raymond says:
    5 years ago

    Yeah smasher007, you can make a shortcut for the command :)

    Reply
  4. jinroh says:
    5 years ago

    smasher007 : yup, i put a shortcut, paste the command there and change the icon… then double click on the shortcut and the safely remove hardware box will pop up

    Reply
  5. mark says:
    5 years ago

    Good tip, thanks man!

    Reply
  6. smasher007 says:
    5 years ago

    Hey..! Nice ..!
    By this command line, can we make a shortcut on the desktop to safely remove the hardware? just double click on the dektop shortcut and we can remove the USB? Is this possible?

    Reply
  7. faizal says:
    5 years ago

    really useful… like it

    Reply
  8. najfal says:
    5 years ago

    Thanks for the Pretty information Roymaond .

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recently Updated

  • flash bios icon

    5 Tools to Easily Install FreeDOS or MS-DOS onto USB for BIOS Flashing

  • avast icon

    Reset or Remove avast! Authorization Password to Access Settings

  • U3 icon

    How to Customize U3 USB Smart Drive to Become Ultimate Hack Tool

New Articles

  • task manager replacement icon

    Memory Usage Test to See Which is the Lightest Antivirus Software

  • kaspersky antivirus 2013 icon

    Activate Free Kaspersky Anti-Virus 2013 ROG with 1 Year License

  • remote access software

    Top 8 Remote Access Software for Providing Online Support

Popular Posts

  • Top 10 FREE Data Recovery Software

    Top 10 FREE Data Recovery Software

  • How to Hack Into a Windows XP Computer Without Changing Password

    How to Hack Into a Windows XP Computer Without Changing Password

  • 10 Free Software to Mount CD or DVD ISO Image File as Virtual Drives

    10 Free Software to Mount CD or DVD ISO Image File as Virtual Drives

Recommend on Google
Follow @raymond_cc
Subscribe Youtube »
(c) 2013 Raymond.CC Blog
  • Contact
  • Disclaimer
  • Disclosure
  • Privacy Policy
  • Terms of Use
  • Sitemap