Executing Control Panel Applets

Example scripts and tips (replaces Old Scripts & Tips archive)

Moderators: Dorian (MJT support), JRL, Phil Pendlebury

Post Reply
User avatar
Marcus Tettmar
Site Admin
Posts: 7351
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Executing Control Panel Applets

Post by Marcus Tettmar » Tue Jul 22, 1997 11:00 pm

Contributed By: Marcus Tettmar [email protected]
Submitted On: 23/07/97

If you need to use Macro Scheduler to change system settings such as
the screen saver or resolution then you need to run the appropriate Control
Panel applet. This is done using the RUNDLL command.

Each applet has a .CPL extension. Take a look in your system directory for
these files. Desk.cpl is the Display settings module. To execute it create a
script with the following command :

RunProgram>rundll32.exe shell32.dll,Control_RunDLL Desk.cpl

For other Control Panel options just change the *.cpl file at the end of the
command.

Remember that the RUNDLL command is case sensitive. shell32.dll and
Control_RunDLL must be entered as they are above.

Some control panel icons do not have associated .cpl files. In this case
the above method is no use. Instead, a reliable way to run one of these
applets is to make a shortcut to the icon and execute that :

1. Open Control Panel
2. Open up Explorer and find a suitable directory, such as the Macro Scheduler directory.
3. Drag the icon from control panel into your selected directory in Explorer.
4. Rename the shortcut to something more easy to type!
5. In Macro Scheduler issue this command :

Execute File>c:\program files\Macro Scheduler\shortcut.lnk

(Change your path to suit the location of the shortcut, and shortcut to the name of your new shortcut).

UPDATE: In Win2k/XP you can simply execute .cpl files directly. e.g.:
ExecuteFile>desk.cpl

Look in c:\Windows\System32 for available .cpl files.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts