Search in uioop.blogspot.com

Labels

Blog Archive

Tuesday, November 4, 2008

Using Rundll32.exe in Windows XP

Although they are not directly executable as programs, the many DLL files present in Windows contain libraries of functions that are used throughout the operating system and in application software. Generally, these functions are used internally by programs and are not directly visible to the computer user. However, Windows XP contains a file rundll32.exe that allows command line access to certain functions that are explicitly written to be available to this executable file. In this article we discuss how to use some of these.


Syntax for using Rundll32.exe

The syntax for using Rundll32.exe must be followed precisely and is as follows:

RUNDLL32.EXE ,

The DLL name may not contain any spaces, commas or quotation marks. If the DLL name does contain spaces, use the short (8.3) version of the file name. Note that there must be a comma between the DLL name and the entry point. Also, the name of the entry point function is case-sensitive, and there can't be any spaces between the DLL name, the comma, and the entry point function name. If the DLL file is not in a folder contained in the system path environment, then the full path must be used for the DLL name. See the Microsoft Knowledge Base for more details.

There are a number of commands employing Rundll32.exe that can be entered into Start-Run, a command window, or used in scripts. A common use is to open various Control Panel applets. (Another method specific to Control Panel is discussed here.) For example, to open the Control Panel applet for configuring the display properties enter

RUNDLL32.EXE SHELL32.DLL,Control_RunDLL desk.cpl,,0

Different tabs for the Desktop applet can be opened by changing the number at the end that is part of the argument. All of the Control Panel applets and their tabs can be opened this way by using the relevant CPL file and the appropriate tab number as arguments. The operating system also uses this method to display Control Panel. In fact, Control Panel applications are the most commonly mentioned examples in discussions of using Rundll32.exe. Examples of some different applications are discussed below.

Applications accessible by using Rundll32.exe

Rundll32.exe is used internally by Windows for a variety of DLL functions not exposed to the PC user but there are a number of DLLs that contain entry points available for external use. The most useful of these DLLs is shell32.dll. As illustrated above, this is the DLL that can be used to open various Control Panel applets.

Here are some lists of available commands (Note: some of the listed commands are for Win98 and do not work in WinXP.)

The last site listed above has a discussion of the many options for command line printer control using Rundll32.exe and printui.dll. The discussion is for Windows 2000 Professional but seems to work the same on my Windows XP Professional system. (I do not know if it applies to XP Home.) If you open a command window and enter the line below an extensive list of options will be shown. There are a variety of possible uses.

RUNDLL32 PRINTUI.DLL,PrintUIEntry /?

Another example is a command that allows you to switch the mouse-buttons for left-hand use. Unfortunately, once the switch is made it seems that it can only be undone by the old-fashioned method of going to Control Panel. In other words, it doesn't act as a toggle but seems to be one way. The command is

RUNDLL32.EXE USER32.DLL,SwapMouseButton

If you need to switch the button settings back and forth, the command given below will take you to the mouse settings dialog

RUNDLL32.EXE SHELL32.dll,Control_RunDLL main.cpl @0,0

A further example is a command that brings up the "Open with.." dialog box for a particular file myfile.ext given as an argument. The full path for myfile.ext must be used unless its folder is in the path environment.

RUNDLL32.EXE SHELL32.DLL,OpenAs_RunDLL

An Internet Explorer application that will clear out the branding that some ISPs like AOL stick into the IE title bar is

RUNDLL32.EXE IEdkcs32.dll,Clear

The Safely Remove Hardware icon that is displayed in the notification area (also called the System Tray) when USB devices are attached can sometimes fail to appear. The utility can be opened by a command

RUNDLL32.EXE SHELL32.DLL,Control_RunDLL HotPlug.dll

The foregoing examples are a only a few of those listed in the references given above. Depending on their pattern of usage and level of computer expertise, PC users may find a variety of others that they are of interest.

Making shortcuts using Rundll32.exe

Many of the commands using Rundll32.exe are more likely to be found in scripts rather than in shortcuts for everyday use. However, creating a shortcut using one of the commands is very easy. Right-click in an empty spot in the folder where you want the shortcut to be located and choose New-Shortcut from the context menu. Enter the desired command in the line "Type the location of the item." Click "Next," choose a name, and click "Finish."

A shortcut that I personally like opens the dialog box for editing the Favorites in Internet Explorer. The command is

RUNDLL32.EXE shdocvw.dll,DoOrganizeFavDlg

In Windows 98/Me two of the most commonly used shortcuts using Rundll32.exe allowed for a quick computer shutdown or for an easy reboot. These do not work in Windows XP. A different method is available using the file shutdown.exe. However, to put your computer into hibernation mode (assuming your power management supports this) the command for a shortcut is

RUNDLL32.EXE PowrProf.dll,SetSuspendState

Error messages involving Rundll32.Exe

Since Rundll32.exe is involved with many processes in Windows, it isn't uncommon that error messages crop up that include references to it. That does not mean that Rundll32.exe is itself the actual culprit. More often than not the problem lies elsewhere, such as the DLL file that is being called. Persistent error messages may also indicate infection by a virus or a spyware or Trojan problem. Regular scans with an anti-virus and spyware removal software with updated definitions should be made. There are too many possible reasons for error messages to be discussed here but H. Leboeuf has a Web page with a large catalog of articles from the Microsoft Knowledge Base that are about Rundll32.exe error messages.

Determining which modules are being executed by Rundll.32.exe

The Windows XP tool Tasklist can be used to determine what program modules are currently being executed by rundll32.exe. (For discussion of Tasklist, go to this page.) To create a list of running tasks, open a Command Prompt window and enter the following command:

tasklist /m /fi "IMAGENAME eq rundll32.exe" >C:\rundll32.txt

This will create a text file rundll32.txt on the C: drive that lists the running modules. If you prefer a different location for the text file, modify the command accordingly. Also, to simply view the running tasks in the command window, omit the part of the command that does file redirection, >C:\rundll32.txt.

Difference between Rundll32.exe and Rundll.exe

Note that Windows 9X/Me still had some 16-bit operating system files so a 16-bit relative of rundll32.exe called rundll.exe was also present in the older versions of Windows. Windows XP is a pure 32-bit system and rundll.exe is not present.

---------------------------------------------------------------------------

http://www.instant-registry-fixes.org/using-rundll32exe-in-windows/

What is Rundll32.exe?

Dynamic Link Libraries (Dlls) are used by Windows operating systems, such as Windows XP and applications installed on it to perform various functions. Most of these functions are used internally and you don’t get to know about them. However, Windows comes equipped with Rundll32.exe, which is a command-line utility that you can use to invoke certain functions exported from DLLs. In this article, we will discuss how to use Rundl32.exe and go through a few examples.

Syntax to Use Rundll32.exe

The syntax to use Rundll32.exe is:

RUNDLL32.EXE ,

The command should follow the following standards:

DLL_Name: Do not include spaces, commas, or quotation marks in the DLL name. If the DLL name consists of spaces, then you must use the 8.3 version or the short name of the DLL.

Entry_Point: Entry point is case sensitive, therefore, you must follow exact casing while adding this value. Also, remember that if the DLL file does not exist in the system folder then you may need to enter the full path for the DLL name.

Optional_Arguments: This part is used to specify any additional task that you want the command to perform. For instance, if you run the following command:

RUNDLL32.EXE SHELL32.DLL,Control_RunDLL desk.cpl,,0

This opens the Display Properties dialog box with the Desktop tab open. Now, you can change the value of the number at the end to specify the tab you want to open with the command.

Note: While running the command you must be sure to follow the exact syntax, otherwise, you may receive an error message.

Rundll32.exe Examples

Let’s now see a few examples of using the Rundll32.exe file. To run the commands discussed here, open Start > Run, enter the command in the ‘Open’ field and select ‘OK’.

Switch Mouse Buttons

To switch mouse buttons for a left-handed user, run the following command.

RUNDLL32.EXE USER32.DLL,SwapMouseButton

This command cannot be used to switch back to default settings, To switch back, you will have to go to Control Panel and open the Mouse Properties dialog box. However, you can directly open the Mouse Properties dialog box by running the command given below.

RUNDLL32.EXE SHELL32.dll,Control_RunDLL main.cpl @0,0

Clear Internet Explorer Title

Some ISPs and software programs modify the title of the Internet Explorer to include their brand name. You can remove this added information and clear the Internet Explorer title bar by running the following command.

RUNDLL32.EXE IEdkcs32.dll,Clear

View Printer Options

To view various print and printer setting related options available on your system, run the command given below.

RUNDLL32 PRINTUI.DLL,PrintUIEntry /?

Hibernate Your System

The power options of some computers—laptops and notebooks—enable you to hibernate them instead of performing a system shutdown. You can use this option when you are going to be away from your PC for a short time. To quickly hibernate your PC, run the command given below.

RUNDLL32.EXE PowrProf.dll,SetSuspendState

Rundll32.Exe Error Messages

Generally, rundll32.exe error messages are displayed when you accidentally download malicious software such as viruses, Trojans, spyware, and adware on your system. These malicious software programs are downloaded when you access dubious websites, open suspicious email attachments, and download uncertified freeware programs. Rundll32.exe errors can also be caused by incorrect software install/uninstall and a damaged registry.

To keep your PC free from rundll32.exe error messages, you must be a vigilant user and be very careful about what you access on the Internet, and what files you download on your system. You must follow correct install/uninstall procedures and use a registry cleaner program to regularly scan and repair the system registry.

Runndll32.exe is used to invoke functions exported from DLLs to perform various tasks. Although, an application may use Rundll32.exe to perform various functions, you can use it to perform a few functions manually. In other words, Rundll32.exe commands can be used as a shortcut to perform certain tasks that otherwise, would have required you to navigate through a number of dialog boxes and windows. To keep your PC free of rundll32.exe error messages, you must keep your antivirus software up-to-date and regularly run antivirus and registry cleaner scans on your system.

No comments:

AVG Internet Security 2013

Total Pageviews

Contributors