Enhanced "remove hardware safely"

This button calls an enhanced system dialog to safely remove hardware.

Safely Remove Hardware.dcf (352 Bytes)

<?xml version="1.0"?>
<button backcol="none" display="both" icon_size="large" label_pos="right" separate="yes" textcol="none">
	<label>Safely Remove Hardware</label>
	<icon1>/system/shell32.dll,-11</icon1>
	<function type="normal">
		<instruction>/system/rundll32.exe shell32.dll,Control_RunDLL HotPlug.dll</instruction>
	</function>
</button>

It is done via calling rundll.exe
It also can take other parameters for different purposes as shown in the table below.

Taken from Complete List of Rundll32 Commands in Windows 11 | Windows 11 Forum

Function​
Rundll32 command​
About WindowsRundll32.exe shell32.dll,ShellAbout
Add Network Location WizardRundll32 %SystemRoot%\system32\shwebsvc.dll,AddNetPlaceRunDll
Add a deviceRundll32.exe shell32.dll,SHHelpShortcuts_RunDLL AddPrinter
Add Standard TCP/IP Printer Port WizardRundll32.exe tcpmonui.dll,LocalAddPortUI
Control PanelRundll32.exe shell32.dll,Control_RunDLL
Bluetooth Settings - Options tabrundll32.exe shell32.dll,Control_RunDLL bthprops.cpl,,1
Bluetooth Settings - COM Ports tabrundll32.exe shell32.dll,Control_RunDLL bthprops.cpl,,2
Bluetooth Settings - Hardware tabrundll32.exe shell32.dll,Control_RunDLL bthprops.cpl,,3
Date and Time - "Date and Time" tabRundll32.exe shell32.dll,Control_RunDLL timedate.cpl
Date and Time - "Additional Clocks" tabRundll32.exe shell32.dll,Control_RunDLL timedate.cpl,,1
Default apps - Settings pageRundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,3
Desktop Icon SettingsRundll32.exe shell32.dll,Control_RunDLL desk.cpl,,0
Device Installation SettingsRundll32.exe %SystemRoot%\System32\newdev.dll,DeviceInternetSettingUi
Device ManagerRundll32.exe devmgr.dll DeviceManager_Execute
Display - Settings pageRundll32.exe shell32.dll,Control_RunDLL desk.cpl
Ease of Access CenterRundll32.exe shell32.dll,Control_RunDLL access.cpl
Environment VariablesRundll32.exe sysdm.cpl,EditEnvironmentVariables
File Explorer Options - General tabRundll32.exe shell32.dll,Options_RunDLL 0
File Explorer Options - Search tabRundll32.exe shell32.dll,Options_RunDLL 2
File Explorer Options - View tabRundll32.exe shell32.dll,Options_RunDLL 7
Fonts folderRundll32.exe shell32.dll,SHHelpShortcuts_RunDLL FontsFolder
Forgotten Password WizardRundll32.exe keymgr.dll,PRShowSaveWizardExW
Game ControllersRundll32.exe shell32.dll,Control_RunDLL joy.cpl
Get ProgramsRundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,1
Hibernate or SleepRundll32.exe powrprof.dll,SetSuspendState
Indexing OptionsRundll32.exe shell32.dll,Control_RunDLL srchadmin.dll
Internet Properties - General tabRundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl
Internet Properties - Security tabRundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,1
Internet Properties - Privacy tabRundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,2
Internet Properties - Content tabRundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,3
Internet Properties - Connections tabRundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,4
Internet Properties - Programs tabRundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,5
Internet Properties - Advanced tabRundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,6
Keyboard Properties - Speed tabRundll32.exe shell32.dll,Control_RunDLL main.cpl @1
Language & region - Settings pageRundll32.exe Shell32.dll,Control_RunDLL input.dll,,1
Lock computerRundll32.exe user32.dll,LockWorkStation
Map Network Drive wizardRundll32.exe shell32.dll,SHHelpShortcuts_RunDLL Connect
Mouse Button swap left and right button functionRundll32.exe user32.dll,SwapMouseButton
Mouse Properties - Buttons tabRundll32.exe shell32.dll,Control_RunDLL main.cpl
Mouse Properties - Pointers tabRundll32.exe shell32.dll,Control_RunDLL main.cpl,,1
Mouse Properties - Pointer Options tabRundll32.exe shell32.dll,Control_RunDLL main.cpl,,2
Mouse Properties - Wheel tabRundll32.exe shell32.dll,Control_RunDLL main.cpl,,3
Mouse Properties - Hardware tabRundll32.exe shell32.dll,Control_RunDLL main.cpl,,4
Network ConnectionsRundll32.exe shell32.dll,Control_RunDLL ncpa.cpl
Notifications - Settings pageRundll32.exe shell32.dll,Options_RunDLL 4
ODBC Data Source Administrator (64-bit)Rundll32.exe shell32.dll,Control_RunDLL odbccp32.cpl
Offline Files - General tabRundll32.exe Shell32.dll,Control_RunDLL cscui.dll,,0
Offline Files - Disk Usage tabRundll32.exe Shell32.dll,Control_RunDLL cscui.dll,,1
Offline Files - Encryption tabRundll32.exe Shell32.dll,Control_RunDLL cscui.dll,,2
Offline Files - Network tabRundll32.exe Shell32.dll,Control_RunDLL cscui.dll,,3
Pen and Touch - Pen Options tabRundll32.exe shell32.dll,Control_RunDLL tabletpc.cpl
Pen and Touch - Touch tabrundll32.exe shell32.dll,Control_RunDLL tabletpc.cpl,,1
Personalization - Settings pageRundll32.exe shell32.dll,Control_RunDLL desk.cpl,,2
Power OptionsRundll32.exe shell32.dll,Control_RunDLL powercfg.cpl
Printer User InterfaceRundll32.exe Printui.dll,PrintUIEntry /?
Printers folderRundll32.exe shell32.dll,SHHelpShortcuts_RunDLL PrintersFolder
Process idle tasksRundll32.exe advapi32.dll,ProcessIdleTasks
Programs and FeaturesRundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,0
Region - Formats tabRundll32.exe shell32.dll,Control_RunDLL Intl.cpl,,0
Region - Administrative tabRundll32.exe shell32.dll,Control_RunDLL Intl.cpl,,1
Safely Remove HardwareRundll32.exe shell32.dll,Control_RunDLL HotPlug.dll
Screen Saver SettingsRundll32.exe shell32.dll,Control_RunDLL desk.cpl,,1
Security and MaintenanceRundll32.exe shell32.dll,Control_RunDLL wscui.cpl
Set Up a Network wizardRundll32.exe shell32.dll,Control_RunDLL NetSetup.cpl
Sleep or HibernateRundll32.exe powrprof.dll,SetSuspendState
Sound - Playback tabRundll32.exe shell32.dll,Control_RunDLL Mmsys.cpl,,0
Sound - Recording tabRundll32.exe shell32.dll,Control_RunDLL Mmsys.cpl,,1
Sound - Sounds tabRundll32.exe shell32.dll,Control_RunDLL Mmsys.cpl,,2
Sound - Communications tabRundll32.exe shell32.dll,Control_RunDLL Mmsys.cpl,,3
Speech Properties - "Text to Speech" tabRundll32.exe shell32.dll,Control_RunDLL %SystemRoot%\System32\Speech\SpeechUX\sapi.cpl,,1
Start - Settings pageRundll32.exe shell32.dll,Options_RunDLL 3
Stored User Names and PasswordsRundll32.exe keymgr.dll,KRShowKeyMgr
System Properties - Computer Name tabRundll32.exe shell32.dll,Control_RunDLL Sysdm.cpl,,1
System Properties - Hardware tabRundll32.exe shell32.dll,Control_RunDLL Sysdm.cpl,,2
System Properties - Advanced tabRundll32.exe shell32.dll,Control_RunDLL Sysdm.cpl,,3
System Properties - System Protection tabRundll32.exe shell32.dll,Control_RunDLL Sysdm.cpl,,4
System Properties - Remote tabRundll32.exe shell32.dll,Control_RunDLL Sysdm.cpl,,5
Taskbar - Settings pageRundll32.exe shell32.dll,Options_RunDLL 1
Text Services and Input LanguagesRundll32.exe Shell32.dll,Control_RunDLL input.dll,,{C07337D3-DB2C-4D0B-9A93-B722A6C106E2}
User AccountsRundll32.exe shell32.dll,Control_RunDLL nusrmgr.cpl
Windows Defender FirewallRundll32.exe shell32.dll,Control_RunDLL firewall.cpl
Windows FeaturesRundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,2
Windows To Go Startup OptionsRundll32.exe pwlauncher.dll,ShowPortableWorkspaceLauncherConfigurationUX
4 Likes