Here is a Syntax-collection ( overview ), how to use RUNDLL32.exe from within FWH.
A working Sample from the List below, called from inside a FWH-Application :
With just one Line of Source, You can start any Windows-System-Process or open a System-Dialog.
Some Examples from the List below :
1. Open Folder System-Settings
WINEXEC( "RUNDLL32 Shell32.dll,Control_RunDLL" )
2. Open a selected Setup-Folder
WINEXEC( "RUNDLL32 Shell32.dll,Control_RunDLL main.cpl,,3" )
0 = Mouse, 1 = Keyboard, 2 = Printer, 3 = Fonts, 4 = Energy
3. Sound-Settings
WINEXEC( "RUNDLL32 shell32.dll,Control_RunDLL mmsys.cpl,,1" )
4. Add / delete Software
WINEXEC( "shell32.dll,Control_RunDLL appwiz.cpl,,0" )
5. Show installed Fonts
WINEXEC( "shell32.dll,SHHelpShortcuts_RunDLL FontsFolder" )
The Application rundll32 / rundll32.exe can execute DLL-Files.
Usage :
Rundll32 <dll>,<function> [<arguments>].
With Rundll32 You can start many Windows-Functions directly.
Can be used in Batch-, Commandline-Mode or inside Your Application with WINEXEC( Rundll32 ????? )
The following Table shows the different calls.
The notation must be exactly as shown :
( sample : Rundll32 shell32.dll,Control_RunDLL hotplug.dll).
Windows Vista and Windows 7 Shortcuts
Wireless Networks pop-up
rundll32.exe van.dll,RunVAN
Advanced Restore
sdclt.exe /restorewizardadmin
Restore Files
sdclt.exe /restorewizard
Backup Location & Settings
sdclt.exe /configure
Add Network Location (wizard)
rundll32.exe shwebsvc.dll,AddNetPlaceRunDll
Indexing Options
control.exe srchadmin.dll
Notification Cache
rundll32.exe shell32.dll,Options_RunDLL 5
Aero (Transparency) Off
Rundll32.exe DwmApi #104
Aero (Transparency) On
Rundll32.exe DwmApi #102
Welcome Center
rundll32.exe oobefldr.dll,ShowWelcomeCenter
Add/Remove Programs
RunDll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,0
Content Advisor
RunDll32.exe msrating.dll,RatingSetupUI
Control Panel
RunDll32.exe shell32.dll,Control_RunDLL
Date and Time Properties
RunDll32.exe shell32.dll,Control_RunDLL timedate.cpl
Display Settings
RunDll32.exe shell32.dll,Control_RunDLL access.cpl,,3
Device Manager
RunDll32.exe devmgr.dll DeviceManager_Execute
Folder Options – File Types
RunDll32.exe shell32.dll,Control_Options 2
Folder Options – General
RunDll32.exe shell32.dll,Options_RunDLL 0
Folder Options – Search
RunDll32.exe shell32.dll,Options_RunDLL 2
Folder Options – View
RunDll32.exe shell32.dll,Options_RunDLL 7
Forgotten Password Wizard
RunDll32.exe keymgr.dll,PRShowSaveWizardExW
Hibernate
RunDll32.exe powrprof.dll,SetSuspendState
Keyboard Properties
RunDll32.exe shell32.dll,Control_RunDLL main.cpl @1
Lock Screen
RunDll32.exe user32.dll,LockWorkStation
Mouse Properties
RunDll32.exe shell32.dll,Control_RunDLL main.cpl @0
Map Network Drive
RunDll32.exe shell32.dll,SHHelpShortcuts_RunDLL Connect
Network Connections
RunDll32.exe shell32.dll,Control_RunDLL ncpa.cpl
Power Options
RunDll32.exe Shell32.dll,Control_RunDLL powercfg.cpl
Regional Settings
RunDll32.exe shell32.dll,Control_RunDLL intl.cpl,,3
Stored Usernames and Passwords
RunDll32.exe keymgr.dll,KRShowKeyMgr
System Properties: Advanced
RunDll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,4
System Properties: Automatic Updates
RunDll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,5
Taskbar Properties
RunDll32.exe shell32.dll,Options_RunDLL 1
User Accounts
RunDll32.exe shell32.dll,Control_RunDLL nusrmgr.cpl
Windows Security Center
RunDll32.exe shell32.dll,Control_RunDLL wscui.cpl
Windows – About
RunDll32.exe SHELL32.DLL,ShellAboutW
Unplug/Eject Hardware
RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll
Windows Firewall
RunDll32.exe shell32.dll,Control_RunDLL firewall.cpl
Wireless Network Setup
RunDll32.exe shell32.dll,Control_RunDLL NetSetup.cpl,@0,WNSW
Open Control Panel (All Items)
explorer.exe shell:::{21ec2020-3aea-1069-a2dd-08002b30309d}
Manage Wireless Networks
explorer.exe shell:::{1fa9085f-25a2-489b-85d4-86326eedcd87}
Sound Control Playback Tab
rundll32.exe shell32.dll,Control_RunDLLmmsys.cpl
Sound Control Sounds Tab
rundll32.exe shell32.dll,Control_RunDLLmmsys.cpl,,2
Sound Control Recording Tab
rundll32.exe shell32.dll,Control_RunDLLmmsys.cpl,,1
Add/Remove Programs
rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl
Add/Remove Windows Components
rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,2
Set Program Access and Computer Defaults
rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,3
People Near Me
rundll32.exe shell32.dll,Control_RunDLL collab.cpl
People Near Me Sign In Tab
rundll32.exe shell32.dll,Control_RunDLL collab.cpl,,1
Screen Resolution
rundll32.exe shell32.dll,Control_RunDLL desk.cpl
Personalization
rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,2
Screen Saver
rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,1
Windows Firewall
rundll32.exe shell32.dll,Control_RunDLL firewall.cpl
Device Manager
rundll32.exe shell32.dll,Control_RunDLL hdwwiz.cpl
Power Options
rundll32.exe shell32.dll,Control_RunDLL powercfg.cpl
Power Options Change Plan Settings
rundll32.exe shell32.dll,Control_RunDLL powercfg.cpl,,1
System Properties
rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl
System Properties Hardware Tab
rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,2
System Properties Advanced Tab
rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,3
System Properties System Protection Tab
rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,4
System Properties Remote Tab
rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,5
Pen and Touch Tablet PC Settings
rundll32.exe shell32.dll,Control_RunDLL tabletpc.cpl
Pen and Touch Tablet PC Settings Flicks Tab
rundll32.exe shell32.dll,Control_RunDLL tabletpc.cpl,,1
Pen and Touch Tablet PC Settings Handwriting Tab
rundll32.exe shell32.dll,Control_RunDLL tabletpc.cpl,,2
Phone and Modem Options
rundll32.exe shell32.dll,Control_RunDLL telephon.cpl
Phone and Modem Options Modems Tab
rundll32.exe shell32.dll,Control_RunDLL telephon.cpl,,1
Phone and Modems Options Advanced Tab
rundll32.exe shell32.dll,Control_RunDLL telephon.cpl,,2
Date and Time
rundll32.exe shell32.dll,Control_RunDLL timedate.cpl
Date and Time Additional Clocks
rundll32.exe shell32.dll,Control_RunDLL timedate.cpl,,1
Action Center
rundll32.exe shell32.dll,Control_RunDLL wscui.cpl
Unplug/Eject Hardware
RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll
Internet Explorer Specific CommandsDelete Temporary Internet Files:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
Delete Cookies:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
Delete History:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
Delete Form Data:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
Delete Passwords:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32
Delete All:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
Delete All + files and settings stored by Add-ons:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351
Miscellaneous Variables
Windows Directory
%WINDIR%
%SYSTEMROOT%
Hard Drive That Contains OS
%HOMEDRIVE%
Users Home Directory
%HOMEPATH%
%USERPROFILE%
Default Temporary Directory
%TEMP%
%TMP%
Program Files
%PROGRAMFILES%
Current Users Application Data Directory
%APPDATA%
Additional Informations about AERO ( On / Off ) :
How to Add Aero ON / OFF Shortcuts in Desktop and My Computer Context Menu Under Windows Vista and 7
Whenever you want to turn Aero ON or OFF, you have to do it either from Desktop Properties or from System properties. But did you know there is a very easy shortcut to do it within seconds?
Here are 2 commands to turn Aero ON / OFF which are used by Windows Vista and 7:
Command to Turn Aero ON: Rundll32 dwmApi #102
Command to Turn Aero OFF: Rundll32 dwmApi #104
You can give the commands in RUN dialog box or Startmenu Searchbox. You can also create their shortcuts on Desktop or Quick Launch or wherever you want. It can become quite handy in lots of situations like a software has disabled Aero because it was not compatible with Aero or if you are running out of battery in your laptop, etc.
You can also add these commands in Desktop context menu or My Computer context menu. e.g. when you'll right-click on Desktop or My Computer icon, you'll find the shortcuts of "Aero ON" and "Aero OFF" there.
Following is a step-by-step tutorial to Add "Aero ON" and "Aero OFF" options in Desktop and My Computer Context Menu:
A. Add "Aero ON" and "Aero OFF" in Desktop Context Menu:
1. Open regedit and goto:
HKEY_CLASSES_ROOT\Directory\Background\shell
2. Right-click on the "Shell" key and select "New -> Key".
3. Give it name Aero ON.
4. Now create another key under "Aero ON" with the name “command” and in right-side pane set value of “Default” to:
Rundll32 dwmApi #102
5. Now repeat steps 2-4 to add "Aero OFF" option, i.e. Right-click on the "Shell" key and select "New -> Key".
6. Give it name Aero OFF.
7. Now create another key under "Aero OFF" with the name “command” and in right-side pane set value of “Default” to:
Rundll32 dwmApi #104
8. Thats it. Now you'll get both "Aero ON" and "Aero OFF" options in Desktop Context Menu.
B. Add "Aero ON" and "Aero OFF" in My Computer Context Menu:
1. Open regedit and goto:
HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D} \shell
2. Right-click on the "Shell" key and select "New -> Key".
3. Give it name Aero ON.
4. Now create another key under "Aero ON" with the name “command” and in right-side pane set value of “Default” to:
Rundll32 dwmApi #102
5. Now repeat steps 2-4 to add "Aero OFF" option, i.e. Right-click on the "Shell" key and select "New -> Key".
6. Give it name Aero OFF.
7. Now create another key under "Aero OFF" with the name “command” and in right-side pane set value of “Default” to:
Rundll32 dwmApi #104
8. Thats it. Now you'll get both "Aero ON" and "Aero OFF" options in My Computer Context Menu.
NOTE: There is also another similar command "Rundll32 dwmApi #105" which is used to run "Flip 3D". You can also add it in My Computer or desktop Context Menu by following the above mentioned steps.
Best Regards
Uwe