Search code examples
windowswindows-explorer

How to open the Run window programmatically


Everyone knows the Run window that you can open with the shortcut Windows+R or directly in the Windows menu then Run.
I'm wondering how to open this Run window programmatically.
This window seems to be part of explorer.exe.
Does anyone have an idea on it ?


Solution

  • You can use IShellDispatch::FileRun to achieve this.

    See Using the Windows RunFile dialog - The documented and undocumented way for details and sample code.