Donation Goal
Donate Now Goal amount for this year: 799 USD, Received: 100 USD (13%)
Please donate to help support this website. The funds will be used to purchase owned license of LiteSpeed Web Server Enterprise (2-CPU). It provides superior performance in terms of raw speed, scalability and anti-DDoS capabilities.

Find Out the Command Line Location When Windows Opens a Window

Posted By Raymond In Category: Computer

Jan
2
2008

Have you ever wondered how people find out shortcuts and command lines on how to open Computer Management, System Properties, Device Manager and etc? Do they actually find out themselves or it is documented in Microsoft Knowledge Base? Or maybe Microsoft employees/programmers revealed it?

An example is an article on how to open Safely Remove Hardware dialog box when the icon is not located at the tray bar which I published 2 days ago. Just run the command line rundll32 shell32.dll,Control_RunDLL hotplug.dll and the Safely Remove Hardware dialog box will appear. As you’ve noticed, it’s not as easy as running a single executable file. It involves rundll32.exe, shell32.dll, the command Control_RunDLL and hotplug.dll. Who could have figured that out?

You will know how to unveil the shortcuts and commands yourself after you’ve finished reading this tutorial.


Actually it’s pretty easy. There’s a popular tool called Process Explorer from Sysinternals which can reveal information about which handles and DLLs processes have opened or loaded. At first I thought Process Explorer is just another task manager program, maybe it’s slightly more powerful than Windows Task Manager but I was wrong. When I explored Process Explorer deeper, I found that it’s VERY powerful.

Anyway, here is how I found out the command line for Safely Remove Hardware dialog box.

1. Run Process Explorer

2. Open Safely Remove Hardware dialog box by right clicking on the tray icon and select “Safely Remove Hardware”

3. You will notice that a new process has been added to Process Explorer and it’s green in color for a second. Double click the process to see the process properties.
Get windows shortcut command line

4. At the Image tab, you’ll see Command Line. That’s the command line that will open Safely Remove Hardware dialog window.
Run DLL as an App

5. To confirm that it is the shortcut command line for Safely Remove Hardware dialog box, copy the command and paste it to Run. If it opens Safely Remove Hardware dialog box, you got it right! If not, it must be another rundll32.exe process.

Using this method you can find out any and all shortcuts you want. I’ve tried on Computer Management, System Properties, Device Manager and I am able to find the command line shortcuts. If Process Explorer unable to capture the process, that means there is no command line for it. An example is My Computer. When you open My Computer, Process Explorer doesn’t capture anything.

[ Download Process Explorer ]


Related posts:
  • Restore Missing or Disappeared Safely Remove Hardware Icon
  • Modify computer’s MBR using command line
  • Hide or Remove “Safely Remove Hardware” Tray Icon
  • Deltree Command Replacement in Windows 2000 or Windows XP
  • How To Change Internet Explorer Window Title Bar Text
    • najfal

      Thanks for the Pretty information Roymaond .

    • Maverick

      Oye, gracias por el gran dato. Me va a servir de mucho. Yo también pensaba que el Process Explorer era otro administrador de tareas de Windows pero ya veo que no.
      Gracias una vez más.
      P.D.: Oye, mucho mejor el diseño de tu página. Me gusta más que el anterior. ;)

    • faizal

      really useful… like it

    • Punit Diwan

      I am using Windows Xp with service 2. Every time I start my system get the following Error:

      Windows – Drive Not Ready

      Exception Processing Message c00000a3 Parameters 75b6bf9c 4 75b6bf9c 75b6bf9c
      Cancel Try Again Continue

      Please help me diagnose what is going wrong. There is no CD in my CD drive.
      Thanks

    • smasher007

      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?

    • http://free-iphone-apple.blogspot.com mark

      Good tip, thanks man!

    • jinroh

      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

    • http://www.raymond.cc/ Raymond

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

    • Luccio

      Really smart trick.
      Thanks, Ray

    • Pingback: How To Fix Windows Cannot Find MSCONFIG Error at RUN Command » Raymond.CC Blog

    • Ro

      Hi there! I keep getting the same error message: Windows – drive not ready Exception Processing Message c00000a3 Parameters 75b6bf9c 4 75b6bf9c 75b6bf9c

      when i try to use my TUNE TRANSFER program to move some songs from my ipod to my itunes. Everytime i turn on the program and try to detect my ipod, it gives me the error and won\’t acknowledge my ipod. I\’ve uninstalled and reinstalled it with the same results, i\’ve also uninstalled and reinstalled itunes but nothing yet. PLEASE HELP!!!

    • Simon

      Hey i want to be able to make a script to disconnect my external HDD. the command “RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll” is all good but that only brings up the “safely remove hardware” box. Can you help me out by telling me how to specify a drive to disconnect instead of clicking “stop device” on the drive?

      e.g. If my HDD was “F:” what would be script be??

    • http://www.mywindowsxp.info DeKaN

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

    • Rich

      Please answer # 12 above. It was a good question, and I have the same question.

      Quote:
      Hey i want to be able to make a script to disconnect my external HDD. the command “RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll” is all good but that only brings up the “safely remove hardware” box. Can you help me out by telling me how to specify a drive to disconnect instead of clicking “stop device” on the drive?
      e.g. If my HDD was “F:” what would be script be??

    • Lucien

      Asnwer to #12, this can be done with microsoft’s devcon tool (device console)

      First find out under which device name your external harddisk registers itself
      c:\>devcon status * | find “DISK” should get you pretty close.
      in my case:
      USBSTOR\DISK&VEN_HTS54808&PROD_0M9AT00&REV_0811\6&9F900F5&0 (will be different is you use external sata or firewire harddisks)

      You need the portion upto the first & ; USBSTOR\DISK

      To disconnect:
      devcon disable USBSTOR\DISK

      to reconnect:
      devcon enable USBSTOR\DISK

      hope this helps

      I haven’t tried with multiple usb disks attached though.

    • Sanjit

      I have an exe, and I run 3 different instances of it, holding diffent proc IDs. I would like to have the CommandLine info for each of this PID which I can see in the ProcExec. But I would like to get this info in my program. How do I get this CommandLine info available with the proc exec within my program ?

      Thank you in advance

    Copyright © 2005-2012 - Raymond.CC Blog