11

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.

fixer1234
  • 27,064
  • 61
  • 75
  • 116
Garhoogin
  • 141
  • 1
  • 1
  • 9
  • Possible duplicate of [How does the windows run dialog locate executables?](http://superuser.com/questions/87372/how-does-the-windows-run-dialog-locate-executables) – Run5k Jan 06 '17 at 00:59

5 Answers5

20

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

Keith Miller
  • 8,704
  • 1
  • 15
  • 28
DavidPostill
  • 153,128
  • 77
  • 353
  • 394
  • 7
    Wow... that actually works. There's no text, which is weird. – Garhoogin Jan 06 '17 at 01: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 08: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}
Marcus Müller
  • 769
  • 6
  • 20
3

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.

Tonny
  • 29,601
  • 7
  • 52
  • 84
1

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

yeralin
  • 111
  • 2
0

Fun fact: You can see the Run's app icon on your Desktop or File Explorer (but cannot launch it) by creating a folder named:

Run.{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}

Actually, you can change its name like...

Nomad.{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}

...or something else like that. Deleting that folder didn't affect the system.

  • This does not provide an answer to the question. Once you have sufficient [reputation](https://superuser.com/help/whats-reputation) you will be able to [comment on any post](https://superuser.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/1084358) – ZygD Oct 11 '21 at 05:03