Name
Rundll32 —
\windows\system32\rundll32.exe
Synopsis
Run a single routine in a DLL file from the command line.
To Open
Command Prompt →
rundll32
Usage
rundll32filename
,function_name
[function
_arguments
. . . ]
Description
Rundll32 provides “string invocation,” which lets you execute a command buried in a Dynamic Link Library (DLL) file.
Rundll32 accepts the following options:
-
filename
The filename of a DLL (
.dll
) file.-
function_name
The case-sensitive name of a function in the DLL file.
-
function_arguments
Any parameters used by
function_name
; refer to the function’s documentation for details. Note that any string parameters are case sensitive.
Examples
The following example starts the “Network Setup Wizard” (note that no parameters are required for this one):
rundll32.exe hnetwiz.dll,HomeNetWizardRunDll
This batch file allows you to display an “Open
As” dialog box for unknown file type
.xyz
without actually having a file of type
.xyz
handy (see Appendix C for
more information on batch files):
echo blah blah blah > foobar.%1 rundll32 shell32.dll,OpenAs_RunDLL foobar.%1
Then type the following at a command line:
C:\>openas xyz
Notes
Rundll32 provides dynamic linking to functions exported from 32-bit
Dynamic Link Libraries. Rundll
, the 16-bit
equivalent found in earlier versions of Windows, is not included in
Windows XP.
Get Windows XP in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.