How Windows 98 Run Dialog Executed Software

The Run dialog box in Microsoft Windows 98 served as a versatile launcher that bridged graphical shell navigation, command-line execution, and internet addressing. By entering a command into this prompt, users could bypass the Start menu and Windows Explorer hierarchy to launch 16-bit and 32-bit executables, open registered documents, or navigate to system folders and URLs. Behind the interface, Windows 98 relied on system path variables, the Windows Registry, and core shell APIs to resolve, validate, and execute user requests.

When a user submitted a command through the Run dialog (accessible via the Start menu or the Win + R shortcut), the operating system passed the input string to the shell execution engine, primarily utilizing the ShellExecute or ShellExecuteEx Win32 API functions. These APIs parsed the string to differentiate between explicit file paths, standalone executable names, documents, and web protocols.

If a user did not provide an absolute file path (such as C:\Program Files\App\program.exe), Windows 98 initiated a structured search sequence to locate the binary. The operating system checked the following locations in order:

  1. The Windows directory (typically C:\WINDOWS).
  2. The 32-bit system directory (C:\WINDOWS\SYSTEM).
  3. Directories specified in the system's PATH environment variable, inherited from AUTOEXEC.BAT or system configuration files.

To prevent third-party applications from cluttering the global PATH variable, Windows 98 extensively used the "App Paths" registry key located at HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths. When a command was entered without a path, the shell queried this registry key for a matching subkey (such as winword.exe or iexplore.exe). If found, Windows 98 extracted the default value pointing to the target's absolute path and used an optional Path string value to temporarily prepend required dynamic-link library (DLL) directories to the application's search path during launch.

The Run dialog handled file types beyond direct executables (.exe, .com, .bat, .pif). If an extension associated with a specific program was entered (such as .doc or .txt), the shell consulted HKEY_CLASSES_ROOT to determine the corresponding handler application and launched that program with the specified file passed as a parameter. With the deep integration of Internet Explorer 4.0 and 5.0 in Windows 98, typing URLs (such as http:// or ftp://) routed execution directly to the web browser or corresponding protocol handler.

Legacy software received specialized handling. If the target was an MS-DOS executable, Windows 98 consulted any accompanying Program Information File (.pif) to configure memory allocation, display modes (full-screen or windowed), and environment settings before launching the program inside a virtual DOS machine (VDM).

Finally, Windows 98 managed command retention via the registry key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU. Every successful command was recorded as a Most Recently Used (MRU) entry, allowing users to recall previous commands through the dialog box's drop-down list.