10

Where is the Windows Run dialog box located? I've opened it and examined the task manager but it just shows up as File Explorer. I've tried showing the command line arguments but it just shows C:\WINDOWS\Explorer.EXE as opposed to C:\WINDOWS\explorer.exe. I've tried searching for run.exe and such, but found nothing.

I have a feeling it may just be command line arguments passed into explorer.exe, but I can't be certain. Is it its own file; could it be a part of explorer.exe?

It has been suggested that this is a duplicate question, so I'll explain that is isn't: I'm not asking how the dialog locates executables, I'm asking where Run, itself, is.

1
19

Where is Windows Run dialog box located?

The Windows Run dialog box is a resource located in c:\windows\system32\shell32.dll.

The dialog can be opened by running the following command:

c:\windows\system32\rundll32.exe shell32.dll,#61

This works on both 32 bit and 64 bit Windows.

The dialog can also be launched with the command:

explorer shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}

(Tested in PowerShell and Command Prompt)

Thanks to Keith Miller for finding this

5
  • 7
    Wow... that actually works. There's no text, which is weird. – Garhoogin Jan 6 '17 at 1:33
  • That's because (see my answer) you just went inside a library and called an arbitrary function, @Garhoogin, and that's not the same thing (i.e. it's missing a few steps) of what happens when you manually open that dialog. – Marcus Müller Nov 15 '17 at 8:21
  • The dialog can also be launched with the command explorer shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}. ( Tested in PowerShell & Command Prompt ) – Keith Miller Jun 17 '20 at 20:27
  • @KeithMiller Great find. I will add it to the answer. – DavidPostill Jun 17 '20 at 20:28
  • Thanks. I explored the registry by testing every CLSID that had a subkey named ShellFolder (lets you know it works iwith Explorer) to see what opened. Aside from the better known System folders and Run, you can toggle Show Desktop with {3080F90D-D7AD-11D9-BD98-0000947B0257}; Window Swithcher (WinKey+tab) with {3080F90E-D7AD-11D9-BD98-0000947B0257} – Keith Miller Jun 17 '20 at 20:50
6

There's no such file. It's literally just a subroutine within some other executable or library (probably, explorer.exe, or even more likely, shell32.dll).

A window you can see doesn't equal to an executable. Drawing a window is just calling functions. There's no reason to assume there'd be a single .exe for every window you see, or that you can pass specific options to an executable to show a specific window!

With the "run" dialog, you might actually be in luck - I think it's probably an exported symbol (read: an externally callable function) of shell32.dll, and you can call it using something like

rundll32.exe shell32.dll,#{ID of Symbol}
5
  • I guess. But I can't figure out which parameters are passed to result in the run dialog. – Garhoogin Jan 6 '17 at 0:48
  • 1
    as, said, there probably are no such parameters. You can't generally assume there are. That's not how software works. – Marcus Müller Jan 6 '17 at 0:50
  • If explorer.exe were to open without parameters then how would it know to open the run dialog? – Garhoogin Jan 6 '17 at 0:55
  • by being the one that receives your clicks/keypresses and reacting to that?! – Marcus Müller Jan 6 '17 at 0:57
  • Factual statements are always better then probable statements. – Ramhound Jan 6 '17 at 3:54
2

There is no separate program. It is function nbr. 61 in Shell32.dll.

The function is called RunFileDlg and takes a bunch of complicated parameters to specify which command to run and how to run it.

Explorer.exe (which is actually the application that handles the Windows Desktop including the handling of the "Run" option in the Start Menu) simply calls this function to do the hard work.
(In fact: Explorer only calls the basic variant. The function has some options that explorer doesn't actually use.)

You can write your own program in whatever programming language you like (as long it allows to call Windows DLL functions) to call RunFileDlg yourself.
All the documentation for that can be found on the Microsoft Technet web-site. and Googling for shell32:RunFileDlg will also get you a bunch of nice examples how to do it.

1

The easiest way for me is explorer.exe Shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}

2
  • This was already suggested in an existing answer. – Ramhound Jun 18 '20 at 0:13
  • 5
    @Ramhound: No, it wasn’t already suggested in an existing answer.  It was posted here first and then subsequently added to an existing answer. – Scott Jun 18 '20 at 2:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.