Where is the Windows Run command located?
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
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}
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.