Hola
Este tutorial muestra como abrir tareas, ventanas y cuadros de diálogo especiales de Windows Vista / 7 o sistema posterior desde nuestro programa.
Supón que quieres abrir el dialogo "Agregar quitar programas". Bastaría simplemente con poner esto:
Process.Start("RunDll32.exe", "shell32.dll,Control_RunDLL appwiz.cpl,,0")
Sin embargo hay zonas que no es posible acceder usando Rundll32.exe.
Por ejemplo, el cuadro de diálogo: "Establecer asociaciones: Asociar un tipo de archivo o protocolo con un determinado programa"
Anteriormente en XP, este cuadro estaba disponible en 'Opciones de Carpeta', pero luego fue eliminado. Ahora hay que ir a Panel de Control/Programas predeterminados/Establecer programas predeterminados" (también es accesible desde el menú Inicio).
¿Cómo podemos hacer que nuestro programa abra diréctamente este cuadro de diálogo o ventana?
Pues utilizando este comando: "shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\8\::{17cd9488-1228-4b2f-88ce-4298e93e0966}\pageFileAssoc"
Process.Start("explorer.exe", "shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\8\::{17cd9488-1228-4b2f-88ce-4298e93e0966}\pageFileAssoc")
Con la función Shell de VB sería así:
Shell("explorer.exe shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\8\::{17cd9488-1228-4b2f-88ce-4298e93e0966}\pageFileAssoc", 1)
En Vista y posterior muchos ventanas y diálogos tienen su código CLSID. Por ejemplo para el Panel de Control el código es: {26EE0668-A00A-44D7-9371-BEB064C98683}
Process.Start("explorer.exe", "shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}")
Donde 'Shell:::{Code CLSID}\Número\", indica la sección del Panel de control:
'Opcciones Adicionales"
Process.Start("explorer.exe", "shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\0\")
'Apariencia y personalización"
Process.Start("explorer.exe", "shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\1\")
'Hardware y sonido"
Process.Start("explorer.exe", "shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\2\")
'"Redes e Internet"
Process.Start("explorer.exe", "shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\3\")
'...
'"Programas"
Process.Start("explorer.exe", "shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\8\")
El código CLSID de "Programas predeterminados" es: {17cd9488-1228-4b2f-88ce-4298e93e0966}
El comando se crea añadiendo un CLSID al anterior, en este caso a 'Panel de control/Programas':
Process.Start("explorer.exe", "shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\8\::{17cd9488-1228-4b2f-88ce-4298e93e0966}")
...y después la página:
"shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\8\::{17cd9488-1228-4b2f-88ce-4298e93e0966}\pageFileAssoc"
Pero no te preocupes más abajo muestro como conseguir los comandos completos y no tienes que inventar nada.
Para abrir el cuadro de diálogo "Propiedades de la barra de tareas y menú inicio" basta con usar este código:
Process.Start("explorer.exe", "shell:::{0DF44EAA-FF21-4412-828E-260A8728E7F1}")
Para el resto se usa rundll32.exe:
'Opciones de carpeta/General
Process.Start("rundll32.exe", "shell32.dll,Options_RunDLL 0")
'Barra de tareas
Process.Start("rundll32.exe", "shell32.dll,Options_RunDLL 1")
'Opciones de carpeta/Buscar
Process.Start("rundll32.exe", "shell32.dll,Options_RunDLL 2")
'Menú inicio
Process.Start("rundll32.exe", "shell32.dll,Options_RunDLL 3")
'Área de notificación
Process.Start("rundll32.exe", "shell32.dll,Options_RunDLL 4")
'Personalizar iconos de notificación
Process.Start("rundll32.exe", "shell32.dll,Options_RunDLL 5")
'Barra de herramientas
Process.Start("rundll32.exe", "shell32.dll,Options_RunDLL 6")
'Opciones de carpeta/Ver
Process.Start("rundll32.exe", "shell32.dll,Options_RunDLL 7")
DONDE ENCONTRAR ESTOS CAMINOS O COMANDOS PARA ACCEDER A ESTAS DETERMINADAS ZONAS DE WINDOWS
Bien que seguramente puedes encontrar muchos en Internet ya que no es ningún secreto, lo que quizás poca gente sabe es que los comandos y accesos a determinazas zonas de windows se encuentran en el recurso [XML] del archivo Shell32.dll.
Personalmente yo he utilizado el programa Resource Hacker (http://www.angusj.com/resourcehacker/), desde el cual abres el archivo Shell32.dll que se haya en la carpeta C:\Windows\System32. Pero también puedes abrir Shell32.dll desde VB.NET mediante "Agregar/Elemento Existente" (CTRL+D), entonces se te carga como un archivo de recursos en C++ y como archivo agregado en un proyecto Windows Forms. Desde el cual podrás acceder a su contenido.
(https://4.bp.blogspot.com/-743iohuCVYY/VytKdxRZnqI/AAAAAAAAAXE/7J3OMvXqO0cuZf7BsE54oQSjmvxTPoG4ACLcB/s640/tutShellimg.jpg)
Desde Resoruce Hacker el contenido XML es perfectamente legible, pero desde .NET, no tanto, ya que se muestra como binario. Si lo cargas desde NET, puedes hacer un copia y pega en el Notepad ya que el texto del recurso XML en realidad es un simple texto plano.
La información XML del archivo Shell32.dll, da cuatro datos respecto a una tarea de windows. Primero la información de la tarea '<!-- Change screen reader -->', luego el ID, Nombre, Keywords y comando:
...
<!-- Change screen reader -->
<sh:task id="{B57D7134-6BAB-47B2-A506-E885E104EC99}">
<sh:name>@shell32.dll,-24754</sh:name>
<sh:keywords>@shell32.dll,-24755</sh:keywords>
<sh:command>shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageNoVisual</sh:command>
</sh:task>
...
ABRIR TODAS LAS TAREAS DE WINDOWS
Mal llamado GodMode (modo dios) o MasterPanel, ya que su verdadero nombre es "All Task" en inglés o "Todas las tareas"
Process.Start("explorer.exe", "shell:::{ed7ba470-8e54-465e-825c-99712043e01c}")
ABRIR ALGUNAS CARPETAS ESPECIALES
'Herramientas administrativas shell:::{D20EA4E1-3957-11d2-A40B-0C5020524153}
'Panel de Control shell:::{21EC2020-3AEA-1069-A2DD-08002b30309d}
'Fuentes shell:::{D20EA4E1-3957-11d2-A40B-0C5020524152}
'Equipo shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}
'Documentos shell:::{450D8FBA-AD25-11D0-98A8-0800361B1103}
'History shell:::{ff393560-c2a7-11cf-bff4-444553540000}
'Red (WORKGROUP) shell:::{208d2c60-3aea-1069-a2d7-08002b30309d}
'Impresoras shell:::{2227A280-3AEA-1069-A2DE-08002B30309D}
'Programs Folder shell:::{7be9d83c-a729-4d97-b5a7-1b7313c39e0a}
'Papelera de reciclaje shell:::{645FF040-5081-101B-9F08-00AA002F954E}
'Menú Inicio shell:::{48e7caab-b918-4e58-a94d-505519c795dc}
'Información y herramientas de rendimiento shell:::{78F3955E-3B90-4184-BD14-5397C15F1EFC}
'Centro de accesibilidad shell:::{D555645E-D4F8-4c29-A827-D93C859C4F2A}
'Windows Defender shell:::{D8559EB9-20C0-410E-BEDA-7ED416AECC2A}
'Mapa de red shell:::{E7DE9B1A-7533-4556-9484-B26FB486475E}
'Windows SideShow shell:::{E95A4861-D57A-4be1-AD0F-35267E261739}
'Personalización shell:::{ED834ED6-4B5A-4bfe-8F11-A626DCB6A921}
'Informe de problemas y soluciones shell:::{FCFEECAE-EE1B-4849-AE50-685DCF7717EC}
'Escáneres y cámaras shell:::{00f2886f-cd64-4fc9-8ec5-30ef6cdbe8c3}
'Opciones de energía shell:::{025A5937-A6BE-4686-A844-36FE4BEC8B6D}
'Propiedades barra de tareas shell:::{0DF44EAA-FF21-4412-828E-260A8728E7F1}
'Obtener programas shell:::{15eae92e-f17a-4431-9f28-805e482dafd4}
'Programas predeterminados shell:::{17cd9488-1228-4b2f-88ce-4298e93e0966}
'Dispositivos Bluetooth shell:::{28803F59-3A75-4058-995F-4EE5503B023C}
'Centro de copias de seguridad y restauración shell:::{335a31dd-f04b-4d76-a925-d6b47cf360df}
'Windows Update shell:::{36eef7db-88ad-4e81-ad49-0e313f0c35f8}
'Propiedades de Windows Sidebar shell:::{37efd44d-ef8d-41b1-940d-96973a50e9e0}
'Get Programs Online shell:::{3e7efb4c-faf1-453d-89eb-56026875ef90}
'Firewall de Windows shell:::{4026492F-2F69-46B8-B9BF-5654FC07E423}
'Opciones de reconocimiento de voz shell:::{58E3C745-D971-4081-9034-86E34B30836A}
'Desfragmentador de disco shell:::{5d9a6bda-b06a-42c0-b50f-5174bcb472de}
'Centro de movilidad de Windows shell:::{5ea4f148-308c-46d7-98a9-49041b1dd468}
'Cuentas de usuario shell:::{60632754-c523-4b62-b45c-4172da012619}
'Opciones de carpeta shell:::{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}
'Administrador de dispositivos shell:::{74246bfc-4c96-11d0-abef-0020af6b0b7a}
'Windows CardSpace shell:::{78CB147A-98EA-4AA6-B0DF-C8681F69341C}
Process.Start("explorer.exe", "shell:::{78F3955E-3B90-4184-BD14-5397C15F1EFC}")
ALGUNAS TAREAS
Accommodate learning abilities:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageQuestionsCognitive
Accommodate low vision:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageEasierToSee
Adjust screen resolution for reading:
%windir%\system32\control.exe desk.cpl,Settings,@Settings
Change how your keyboard works:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageKeyboardEasierToUse
Change how your mouse works:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageEasierToClick
Change screen reader:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageNoVisual
Change the Narrator voice:
%windir%\system32\narrator.exe
Control the computer without the mouse or keyboard:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageNoMouseOrKeyboard
Hear a tone when keys are pressed:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageFilterKeysSettings
Hear text read aloud with Narrator:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}
Ignore repeated keystrokes using FilterKeys:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageFilterKeysSettings
Let Windows suggest Ease of Access settings:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageQuestionsEyesight
Magnify portions of the screen using Magnifier:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageEasierToSee
Move the pointer with the keypad using MouseKeys:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageKeyboardEasierToUse
Optimize for blindness:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageNoVisual
Optimize visual display:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageEasierToSee
Press key combinations one at a time:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageKeyboardEasierToUse
Replace sounds with visual cues:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageEasierWithSounds
Turn High Contrast on or off:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}
Turn Magnifier on or off:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}
Turn off background images:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageEasierToSee
Turn off unnecessary animations:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageEasierToSee
Turn On-Screen keyboard on or off:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}
Underline keyboard shortcuts and access keys:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageKeyboardEasierToUse
Use audio description for video:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}\pageEasierToSee
View current accessibility settings:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\7\::{D555645E-D4F8-4c29-A827-D93C859C4F2A}
Create and format hard disk partitions:
%windir%\system32\mmc.exe %windir%\system32\diskmgmt.msc
Defragment your hard drive:
%windir%\system32\dfrgui.exe
Diagnose your computer's memory problems:
%windir%\system32\mdsched.exe
Edit group policy:
%windir%\system32\mmc.exe %windir%\system32\gpedit.msc
Generate a system health report:
%windir%\system32\perfmon.exe /report
How to add new hardware:
mshelp://windows/?id=dfd48704-eb89-4e9f-b3de-552f0ca60640
Schedule tasks:
%windir%\system32\mmc.exe %windir%\system32\taskschd.msc
Set up data sources (ODBC):
%windir%\system32\odbcad32.exe
Set up iSCSI initiator:
%windir%\system32\iscsicpl.exe
View event logs:
%windir%\system32\mmc.exe %windir%\system32\eventvwr.msc
View event logs:
%windir%\system32\mmc.exe %windir%\system32\eventvwr.msc
View local services:
%windir%\system32\mmc.exe %windir%\system32\services.msc
Add or remove programs:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\8\::{7B81BE6A-CE2B-4676-A29E-EB907A5126C5}
Change or remove a program:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\8\::{7B81BE6A-CE2B-4676-A29E-EB907A5126C5}
How to install a program:
mshelp://windows/?id=fe7ea80e-52a2-48d6-947a-05e02e78bc37
Install a program from the network:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\8\::{15EAE92E-F17A-4431-9F28-805E482dAFD4}
Show which programs are installed on my computer:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\8\::{7B81BE6A-CE2B-4676-A29E-EB907A5126C5}
Turn Windows features on or off:
%windir%\system32\OptionalFeatures.exe
Turn Windows features on or off:
%windir%\system32\CompMgmtLauncher.exe
Uninstall a program:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\8\::{7B81BE6A-CE2B-4676-A29E-EB907A5126C5}
View installed updates:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\8\::{7B81BE6A-CE2B-4676-A29E-EB907A5126C5}\::{D450A8A1-9568-45C7-9C0E-B4F9FB4537BD}
Change default e-mail program:
%windir%\system32\ComputerDefaults.exe
Change default programs that Windows uses:
%windir%\system32\ComputerDefaults.exe
Make a file type always open in a specific program:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\8\::{17cd9488-1228-4b2f-88ce-4298e93e0966}\pageFileAssoc
Set program defaults for this computer:
%windir%\system32\ComputerDefaults.exe
Set your default programs:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\8\::{17cd9488-1228-4b2f-88ce-4298e93e0966}\pageDefaultProgram
Use an older program with this version of Windows:
%windir%\system32\mshta.exe res://%windir%\system32\acprgwiz.dll/compatmode.hta
Change settings for a Bluetooth enabled device:
%windir%\system32\control.exe bthprops.cpl,,1
Set up a Bluetooth enabled device:
%windir%\system32\control.exe bthprops.cpl
Back up your computer:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\5\::{335a31dd-f04b-4d76-a925-d6b47cf360df}
Restore data, files, or computer from backup:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\5\::{335a31dd-f04b-4d76-a925-d6b47cf360df}
Schedule automated backups:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\5\::{335a31dd-f04b-4d76-a925-d6b47cf360df}
Change advanced color management settings for displays, scanners, and printers:
%windir%\system32\colorcpl.exe
Add clocks for different time zones:
%windir%\system32\control.exe timedate.cpl,,1
Automatically adjust for daylight saving time:
%windir%\system32\control.exe timedate.cpl
Change the time zone:
%windir%\system32\control.exe timedate.cpl
Set the time and date:
%windir%\system32\control.exe timedate.cpl
Find which version of Windows you are using:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\5\::{CB1B7F8C-C50A-4176-B604-9E24DEE8D4D1}
Get started with Windows:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\5\::{CB1B7F8C-C50A-4176-B604-9E24DEE8D4D1}
Migrate files and settings from one computer to another:
%windir%\system32\migwiz\migwiz.exe
Check for new solutions:
%windir%\system32\wercon.exe -solutioncheck
Choose how to check for solutions:
%windir%\system32\wercon.exe -showweropts
View problem history:
%windir%\system32\wercon.exe -problemhistory
Change default settings for media or devices:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\2\::{9C60DE1E-E5FC-40f4-A487-460851A8D915}
Play CDs or other media automatically:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\2\::{9C60DE1E-E5FC-40f4-A487-460851A8D915}
Start or stop using autoplay for all media and devices:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\2\::{9C60DE1E-E5FC-40f4-A487-460851A8D915}
Change search options for files and folders:
%windir%\system32\rundll32.exe shell32.dll,Options_RunDLL 2
Change the file type associated with a file extension:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\8\::{17cd9488-1228-4b2f-88ce-4298e93e0966}\pageFileAssoc
Show hidden files and folders:
%windir%\system32\rundll32.exe shell32.dll,Options_RunDLL 7
Show or hide file extensions:
%windir%\system32\rundll32.exe shell32.dll,Options_RunDLL 7
Specify single- or double-click to open:
shell:::{6DFD7C5C-2451-11D3-A299-00C04F8EF6AF}
Use Classic Windows folders:
shell:::{6DFD7C5C-2451-11D3-A299-00C04F8EF6AF}
Install or remove a font:
%windir%\system32\control.exe /name Microsoft.Fonts
View installed fonts:
%windir%\system32\control.exe /name Microsoft.Fonts
Set up USB game controllers:
%windir%\system32\control.exe joy.cpl
Adjust commonly used mobility settings:
%windir%\system32\mblctr.exe /open
Adjust screen brightness:
%windir%\system32\mblctr.exe /open
Adjust settings before giving a presentation:
%windir%\system32\presentationsettings.exe
Connect to a projector or other external display:
%windir%\system32\mblctr.exe /open
Block or allow pop-ups:
%windir%\system32\control.exe inetcpl.cpl,,2
Block or allow third-party cookies:
%windir%\system32\control.exe inetcpl.cpl,,2
Change how web pages are displayed in tabs:
%windir%\system32\control.exe inetcpl.cpl,,0
Change security settings:
%windir%\system32\control.exe inetcpl.cpl,,1
Change temporary Internet file settings:
%windir%\system32\control.exe inetcpl.cpl,,0
Change the default Web browser:
%windir%\system32\ComputerDefaults.exe
Change the search provider in Internet Explorer:
%windir%\system32\control.exe inetcpl.cpl,,0
Change your homepage:
%windir%\system32\control.exe inetcpl.cpl,,0
Configure proxy server:
%windir%\system32\control.exe inetcpl.cpl,,4
Connect to the Internet:
%windir%\system32\rundll32.exe xwizards,RunWizard {7071ECA0-663B-4bc1-A1FA-B97F3B917C55} /z -ShowFinishPage
Delete browsing history:
%windir%\system32\control.exe inetcpl.cpl,,0
Delete cookies or temporary files:
%windir%\system32\control.exe inetcpl.cpl,,0
Enable or disable session cookies:
%windir%\system32\control.exe inetcpl.cpl,,2
Manage browser add-ons:
%windir%\system32\control.exe inetcpl.cpl,,5
Tell if an RSS feed is available on a website:
%windir%\system32\control.exe inetcpl.cpl,,3
Turn autocomplete in Internet Explorer on or off:
%windir%\system32\control.exe inetcpl.cpl,,3
Change cursor blink rate:
%windir%\system32\control.exe /name Microsoft.Keyboard
Check keyboard status:
%windir%\system32\control.exe /name Microsoft.Keyboard /page 1
Change button settings:
%windir%\system32\control.exe main.cpl
Change how the mouse pointer looks:
%windir%\system32\control.exe main.cpl,,1
Change how the mouse pointer looks when it's moving:
%windir%\system32\control.exe main.cpl,,2
Change mouse click settings:
%windir%\system32\control.exe main.cpl
Change mouse wheel settings:
%windir%\system32\control.exe main.cpl,,3
Change the mouse pointer display or speed:
%windir%\system32\control.exe main.cpl,,2
Customize the mouse buttons:
%windir%\system32\control.exe main.cpl
Make it easier to see the mouse pointer:
%windir%\system32\control.exe main.cpl,,2
Add gadgets to Sidebar:
%programfiles%\windows sidebar\sidebar.exe /showgadgets
Add the Clock gadget to Windows Sidebar:
%programfiles%\windows sidebar\sidebar.exe /showgadgets
Choose whether to keep Sidebar on top of other windows:
%programfiles%\windows sidebar\sidebar.exe /cpl
Uninstall a gadget:
%programfiles%\windows sidebar\sidebar.exe /uninstallgadgets
Compare features with your current configuration:
%windir%\system32\WindowsAnytimeUpgrade.exe /UpgradeOnline
Get new programs online at Windows Marketplace:
%windir%\system32\rundll32.exe %windir%\system32\appwiz.cpl,GetProgramsOnline
Manage programs you buy online (digital locker):
%windir%\DigitalLocker\digitalx.exe
Enable offline files:
%windir%\system32\control.exe cscui.dll,,0
Encrypt your offline files:
%windir%\system32\control.exe cscui.dll,,2
Manage disk space used by your offline files:
%windir%\system32\control.exe cscui.dll,,1
Set up parental controls for any user:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\9\::{96AE8D84-A250-4520-95A5-A47A7E3C548B}
View activity reports:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\9\::{96AE8D84-A250-4520-95A5-A47A7E3C548B}\pageActivityViewer
View parental control settings for your account:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\9\::{96AE8D84-A250-4520-95A5-A47A7E3C548B}\pageUserHub
Set up dialing rules:
%windir%\system32\control.exe telephon.cpl
Install drivers for older devices with Add Hardware wizard:
%windir%\system32\hdwwiz.exe
Update device drivers:
%windir%\system32\mmc.exe devmgmt.msc
View hardware and devices:
%windir%\system32\mmc.exe devmgmt.msc
View hardware and devices:
%windir%\system32\mmc.exe devmgmt.msc
Change battery settings:
shell:::{26ee0668-a00a-44d7-9371-beb064c98683}\2\::{025A5937-A6BE-4686-A844-36FE4BEC8B6D}
Change power-saving settings:
shell:::{26ee0668-a00a-44d7-9371-beb064c98683}\2\::{025A5937-A6BE-4686-A844-36FE4BEC8B6D}
Change what closing the lid does:
shell:::{26ee0668-a00a-44d7-9371-beb064c98683}\2\::{025A5937-A6BE-4686-A844-36FE4BEC8B6D}\pageGlobalSettings
Change what the power buttons do:
shell:::{26ee0668-a00a-44d7-9371-beb064c98683}\2\::{025A5937-A6BE-4686-A844-36FE4BEC8B6D}\pageGlobalSettings
Change when the computer sleeps:
shell:::{26ee0668-a00a-44d7-9371-beb064c98683}\2\::{025A5937-A6BE-4686-A844-36FE4BEC8B6D}\pagePlanSettings
Choose when to turn off display:
shell:::{26ee0668-a00a-44d7-9371-beb064c98683}\2\::{025A5937-A6BE-4686-A844-36FE4BEC8B6D}\pagePlanSettings
Require a password when the computer wakes:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\2\::{025A5937-A6BE-4686-A844-36FE4BEC8B6D}\pageGlobalSettings
Turn hibernation on or off:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\2\::{025A5937-A6BE-4686-A844-36FE4BEC8B6D}\pagePlanSettings
Add a printer:
%windir%\system32\rundll32.exe printui.dll,PrintUIEntry /il
Change default printer:
%windir%\system32\control.exe /name Microsoft.Printers
Remove a printer:
%windir%\system32\control.exe /name Microsoft.Printers
Send a fax:
%windir%\system32\wfs.exe
Send a fax:
%windir%\system32\wfs.exe
View all printers:
%windir%\system32\control.exe /name Microsoft.Printers
Change display language:
%windir%\system32\control.exe intl.cpl,,/p:"keyboard"
Change keyboards or other input methods:
%windir%\system32\control.exe intl.cpl,,/p:"keyboard"
Change the country or region:
%windir%\system32\control.exe intl.cpl,,/p:"location"
Change the date, time, or number format:
%windir%\system32\control.exe intl.cpl
Change the languages used for partially translated menus and dialogs:
%windir%\system32\control.exe intl.cpl,,/p:"keyboard"
Change the way currency is displayed:
%windir%\system32\control.exe intl.cpl
Change the way dates and lists are displayed:
%windir%\system32\control.exe intl.cpl
Change the way measurements are displayed:
%windir%\system32\control.exe intl.cpl
Change the way time is displayed:
%windir%\system32\control.exe intl.cpl
Install or uninstall display languages:
%windir%\system32\lpksetup.exe
Scan a document or picture:
%windir%\system32\wfs.exe
Scan a document or picture:
%windir%\system32\wfs.exe
View scanners and cameras:
%ProgramFiles%\Windows Photo Gallery\ImagingDevices.exe
Change how Windows searches:
%windir%\system32\control.exe srchadmin.dll,,2
Check firewall status:
%windir%\system32\FirewallSettings.exe
Check this computer's security status:
%windir%\system32\control.exe wscui.cpl
Adjust system volume:
%windir%\system32\sndvol.exe
Change sound card settings:
%windir%\system32\control.exe mmsys.cpl,,0
Change system sounds:
%windir%\system32\control.exe mmsys.cpl,,2
Manage audio devices:
%windir%\system32\control.exe mmsys.cpl ,,0
Change text to speech settings:
%windir%\system32\control.exe %windir%\system32\speech\speechux\sapi.cpl
Print the speech reference card:
mshelp://windows/?id=f968a8dd-011d-40fe-84be-93273d6580f0
Set up a microphone:
%windir%\system32\rundll32.exe %windir%\system32\speech\speechux\SpeechUX.dll,RunWizard MicTraining
Start speech recognition:
%windir%\speech\common\sapisvr.exe -SpeechUX
Take speech tutorials:
%windir%\system32\rundll32.exe %windir%\system32\speech\speechux\SpeechUX.dll,RunWizard Tutorial
Train the computer to recognize your voice:
%windir%\system32\rundll32.exe %windir%\system32\speech\speechux\SpeechUX.dll,RunWizard UserTraining
Resolve sync conflicts:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\3\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\::{E413D040-6788-4C22-957E-175D1C513A34}
Sync with other computers, mobile devices, or network folders:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\3\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}
View sync results:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\3\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\::{BC48B32F-5910-47F5-8570-5074A8A5636A}
Activate Windows:
%windir%\system32\slui.exe
Adjust the appearance and performance of Windows:
%windir%\system32\SystemPropertiesPerformance.exe
Allow remote access to your computer:
%windir%\system32\SystemPropertiesRemote.exe
Allow Remote Assistance invitations to be sent from this computer:
%windir%\system32\SystemPropertiesRemote.exe
Change workgroup name:
%windir%\system32\SystemPropertiesComputerName.exe
Check processor speed:
shell:::{26ee0668-a00a-44d7-9371-beb064c98683}\5\::{BB06C0E4-D293-4f75-8A90-CB05B6477EEE}
Configure advanced user profile properties:
%windir%\system32\rundll32.exe sysdm.cpl,EditUserProfiles
Create a restore point:
%windir%\system32\SystemPropertiesProtection.exe
Edit environment variables for your account:
%windir%\system32\rundll32.exe sysdm.cpl,EditEnvironmentVariables
Edit the system environment variables:
%windir%\system32\SystemPropertiesAdvanced.exe
How to change the size of virtual memory:
mshelp://windows/?id=89ca317f-649d-40a6-8934-e5707ee5c4b8
Join a domain:
%windir%\system32\SystemPropertiesComputerName.exe
Rename this computer:
%windir%\system32\SystemPropertiesComputerName.exe
Restore system files and settings from a restore point:
%windir%\system32\rstrui.exe
See the name of this computer:
shell:::{26ee0668-a00a-44d7-9371-beb064c98683}\5\::{BB06C0E4-D293-4f75-8A90-CB05B6477EEE}
Select users who can use remote desktop:
%windir%\system32\SystemPropertiesRemote.exe
Show how much RAM is on this computer:
shell:::{26ee0668-a00a-44d7-9371-beb064c98683}\5\::{BB06C0E4-D293-4f75-8A90-CB05B6477EEE}
Show which domain my computer is on:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\5\::{BB06C0E4-D293-4f75-8A90-CB05B6477EEE}
Show which operating system my computer is running:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\5\::{BB06C0E4-D293-4f75-8A90-CB05B6477EEE}
Show which workgroup this computer is on:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\5\::{BB06C0E4-D293-4f75-8A90-CB05B6477EEE}
Turn automatic creation of restore points on or off:
%windir%\system32\SystemPropertiesProtection.exe
View advanced system settings:
%windir%\system32\SystemPropertiesAdvanced.exe
View basic information about your computer:
shell:::{26ee0668-a00a-44d7-9371-beb064c98683}\5\::{BB06C0E4-D293-4f75-8A90-CB05B6477EEE}
View running processes with Task Manager:
%windir%\system32\taskmgr.exe
Auto-hide the taskbar:
shell:::{0DF44EAA-FF21-4412-828E-260A8728E7F1}
Change Start menu to Classic view:
%windir%\System32\rundll32.exe shell32.dll,Options_RunDLL 3
Customize icons on the taskbar:
%windir%\System32\rundll32.exe shell32.dll,Options_RunDLL 4
Customize the Start menu:
%windir%\system32\rundll32.exe shell32.dll,Options_RunDLL 3
Customize the taskbar:
shell:::{0DF44EAA-FF21-4412-828E-260A8728E7F1}
Find missing Start menu:
shell:::{0DF44EAA-FF21-4412-828E-260A8728E7F1}
Group similar windows on the taskbar:
shell:::{0DF44EAA-FF21-4412-828E-260A8728E7F1}
Lock or unlock the taskbar:
shell:::{0DF44EAA-FF21-4412-828E-260A8728E7F1}
Organize Start menu:
%windir%\system32\rundll32.exe shell32.dll,Options_RunDLL 3
Remove icons from notification area (system tray) on the desktop:
%windir%\System32\rundll32.exe shell32.dll,Options_RunDLL 4
Restore Start menu defaults:
%windir%\system32\rundll32.exe shell32.dll,Options_RunDLL 3
Show or hide inactive icons on the taskbar:
%windir%\System32\rundll32.exe shell32.dll,Options_RunDLL 4
Show or hide the notification area on the taskbar:
%windir%\System32\rundll32.exe shell32.dll,Options_RunDLL 4
Show or hide the Quick Launch toolbar on the taskbar:
shell:::{0DF44EAA-FF21-4412-828E-260A8728E7F1}
Show or hide volume (speaker) icon on the taskbar:
%windir%\System32\rundll32.exe shell32.dll,Options_RunDLL 4
Turn toolbars on the taskbar on or off:
%windir%\System32\rundll32.exe shell32.dll,Options_RunDLL 6
Add or remove user accounts:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\9\::{60632754-c523-4b62-b45c-4172da012619}\pageAdminTasks
Change account type:
%windir%\system32\netplwiz.exe
Change your account picture:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\9\::{60632754-c523-4b62-b45c-4172da012619}\pagePickMyPicture
Change your Windows password:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\9\::{60632754-c523-4b62-b45c-4172da012619}
Create a password reset disk:
%windir%\system32\rundll32.exe keymgr.dll,PRShowSaveWizardExW
Create administrator account:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\9\::{60632754-c523-4b62-b45c-4172da012619}\pageAdminTasks\pageNameNewAccount
Create an account:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\9\::{60632754-c523-4b62-b45c-4172da012619}\pageAdminTasks\pageNameNewAccount
Create or remove your account password:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\9\::{60632754-c523-4b62-b45c-4172da012619}
Create standard user account:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\9\::{60632754-c523-4b62-b45c-4172da012619}\pageAdminTasks\pageNameNewAccount
Edit local users and groups:
%windir%\system32\mmc.exe %windir%\system32\lusrmgr.msc
Give administrative rights to a domain user:
%windir%\system32\netplwiz.exe
Give other users access to this computer:
%windir%\system32\netplwiz.exe
How to change your Windows password:
mshelp://windows/?id=5c07e067-286d-4b8d-b342-431306e696aa
Make changes to accounts:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\9\::{60632754-c523-4b62-b45c-4172da012619}\pageAdminTasks
Manage file encryption certificates:
%windir%\system32\rekeywiz.exe
Manage network passwords:
%windir%\system32\rundll32.exe keymgr.dll KRShowKeyMgr
Turn guest account on or off:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\9\::{60632754-c523-4b62-b45c-4172da012619}\pageAdminTasks
Turn User Account Control (UAC) on or off:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\9\::{60632754-c523-4b62-b45c-4172da012619}\pageChangeSecuritySettings
Allow a program through Windows Firewall:
%windir%\system32\FirewallSettings.exe 1
Turn Windows Firewall on or off:
%windir%\system32\FirewallSettings.exe
Get new programs online at Windows Marketplace:
%windir%\system32\rundll32.exe %windir%\system32\appwiz.cpl,GetProgramsOnline
Manage programs you buy online (digital locker):
%windir%\DigitalLocker\digitalx.exe
Check for updates:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\10\::{36eef7db-88ad-4e81-ad49-0e313f0c35f8}
Turn automatic updating on or off:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\10\::{36eef7db-88ad-4e81-ad49-0e313f0c35f8}\pageSettings
Check your computer's Windows Experience Index base score:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\5\::{78F3955E-3B90-4184-BD14-5397C15F1EFC}
Free up disk space by deleting unnecessary files:
%windir%\system32\cleanmgr.exe
Use tools to improve performance:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\5\::{78F3955E-3B90-4184-BD14-5397C15F1EFC}
Manage BitLocker keys:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\10\::{D9EF8727-CAC2-4e60-809E-86F80A666C91}
Protect your computer by encrypting data on your disk:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\10\::{D9EF8727-CAC2-4e60-809E-86F80A666C91}
Change People Near Me settings:
%windir%\system32\control.exe collab.cpl,,2
Sign in or out of People Near Me:
%windir%\system32\control.exe collab.cpl,,1
Change pen flicks settings:
%windir%\system32\control.exe TabletPC.cpl @0,flicks
Change tablet pen settings:
%windir%\system32\control.exe TabletPC.cpl @0,pen
Enable or disable handwriting personalization:
%windir%\system32\control.exe TabletPC.cpl @1,handwriting
Turn pen flicks on and off:
%windir%\system32\control.exe TabletPC.cpl @0,flicks
Turn the touch pointer on and off:
%windir%\system32\control.exe TabletPC.cpl @0,touch
Calibrate the screen:
%windir%\system32\control.exe TabletPC.cpl @1,general
Change screen orientation:
%windir%\system32\control.exe TabletPC.cpl @1,display
Set tablet buttons to perform certain tasks:
%windir%\system32\control.exe TabletPC.cpl @1,buttons
Specify which hand I write with:
%windir%\system32\control.exe TabletPC.cpl @1,general
Send or receive a file:
%windir%\system32\control.exe irprops.cpl
Change device settings:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\2\::{E95A4861-D57A-4be1-AD0F-35267E261739}\pageChangeSettingsDeviceSelector
Change the order of gadgets:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\2\::{E95A4861-D57A-4be1-AD0F-35267E261739}\pageReorderGadgetsDeviceSelector
Configure an auxiliary display:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\2\::{E95A4861-D57A-4be1-AD0F-35267E261739}
Set up a secondary display to use with Windows SideShow:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\2\::{E95A4861-D57A-4be1-AD0F-35267E261739}
Turn gadgets on or off:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\2\::{E95A4861-D57A-4be1-AD0F-35267E261739}
Wake computer to update devices:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\2\::{E95A4861-D57A-4be1-AD0F-35267E261739}\pageAutoWake
Adjust font size (DPI):
%windir%\system32\DpiScaling.exe
Adjust screen resolution:
%windir%\system32\control.exe desk.cpl,Settings,@Settings
Change desktop background:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\1\::{ED834ED6-4B5A-4bfe-8F11-A626DCB6A921}\pageWallpaper
Change display settings:
%windir%\system32\control.exe desk.cpl,Settings,@Settings
Change screen saber:
%windir%\system32\control.exe desk.cpl,screensaver,@screensaver
Change size of on-screen items:
%windir%\system32\DpiScaling.exe
Change the color scheme:
%windir%\system32\control.exe desk.cpl,appearance,@appearance
Change the theme:
%windir%\system32\control.exe desk.cpl,Themes,@Themes
Customize colors:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\1\::{ED834ED6-4B5A-4bfe-8F11-A626DCB6A921}\pageColorization
Enable or disable transparent glass on windows:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\1\::{ED834ED6-4B5A-4bfe-8F11-A626DCB6A921}\pageColorization
How to correct monitor flicker (refresh rate):
mshelp://windows/?id=52f7448b-d524-44e4-b43d-15b5a2968537
How to use ClearType to sharpen the screen text:
mshelp://windows/?id=c3a4da66-c335-45f5-a71f-d162d1b64ed4
Lock the computer when I leave it alone for a period of time:
%windir%\system32\control.exe desk.cpl,screensaver,@screensaver
Set screen saber password:
%windir%\system32\control.exe desk.cpl,screensaver,@screensaver
Set up computer to use multiple monitors:
%windir%\system32\control.exe desk.cpl,Monitor,@Monitor
Show or hide common icons on the desktop:
%windir%\system32\control.exe desk.cpl,,0
Turn screen saber on or off:
%windir%\system32\control.exe desk.cpl,screensaver,@screensaver
View the name of the video card:
%windir%\system32\control.exe desk.cpl,Settings,@Settings
Manage Information Cards that are used to log on to online services:
%windir%\system32\control.exe /name Microsoft.CardSpace
Add a device to the network:
%windir%\system32\rundll32.exe %systemroot%\System32\xwizards.dll,RunWizard {d1a4299a-0adf-11da-b070-0011856571de}
Connect to a network:
shell:::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{38A98528-6CBF-4CA9-8DC0-B1E1D10F7B1B}
Connect to a wireless network:
%windir%\system32\rundll32.exe xwizards,RunWizard {7071ECE0-663B-4bc1-A1FA-B97F3B917C55} /z -ShowFinishPage
Identify and repair network problems:
%windir%\system32\Rundll32.exe ndfapi,NdfRunDllDiagnoseIncident
Manage saved networks:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\3\::{8E908FC9-BECC-40f6-915B-F4CA0E70D03D}
Manage wireless networks:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\3\::{1FA9085F-25A2-489B-85D4-86326EEDCD87}
Set up a dial-up connection:
%windir%\system32\rundll32.exe xwizards,RunWizard {7071ECE0-663B-4bc1-A1FA-B97F3B917C55} /z -ShowFinishPage
Set up a virtual private network (VPN) connection:
%windir%\system32\rundll32.exe xwizards,RunWizard {7071ECE0-663B-4bc1-A1FA-B97F3B917C55} /z -ShowFinishPage
Set up an ad hoc (computer-to-computer) network:
%windir%\system32\rundll32.exe xwizards,RunWizard {7071ECE0-663B-4bc1-A1FA-B97F3B917C55} /z -ShowFinishPage
Set up file sharing:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\3\::{8E908FC9-BECC-40f6-915B-F4CA0E70D03D}
Share printers:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\3\::{8E908FC9-BECC-40f6-915B-F4CA0E70D03D}
View network computers and devices:
shell:::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}
View network connections:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\3\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}
View network status and tasks:
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\3\::{8E908FC9-BECC-40f6-915B-F4CA0E70D03D}
Scan for spyware and other potentially unwanted software:
%ProgramFiles%\windows defender\MSASCui.exe -quickscan
Stop a program from running at startup:
%ProgramFiles%\windows defender\MSASCui.exe -showSWE:Startup
View currently running programs:
%ProgramFiles%\windows defender\MSASCui.exe -showSWE:Running
Hola
Buen aporte Lekim. Añadiré algunos detalles importantes a lo que has explicado:
1.
La enumeración
Environment.SpecialFolder recopila muchas de las carpetas especiales o virtuales del sistema.
- System.Environment.SpecialFolder | MSDN (https://msdn.microsoft.com/es-es/library/system.environment.specialfolder%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396)
2.
Para quien tenga la curiosidad de saberlo:
Al usar la aplicacion
Rundll32 como en este ejemplo de aquí abajo, el primer parámetro especifica el nombre de la dll, el segundo parámetro especifica el nombre de la función (tiene que ser COM visible), y el resto de parámetros son los parámetros de dicha función, donde el último parámetro en este caso especifica la página o pestaña que queremos abrir con un índice basado en cero, siendo así el valor "
0" la primera página.
RunDll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,0
3.
Se puede reemplazar el uso de
Rundll32 por la aplicación
Control para evitar tener que especificar el nombre de la dll y el nombre de la función, simplificando así el código.
De esto:
RunDll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,0
A esto otro:
control.exe appwiz.cpl,,0
4.
En realidad el uso de
GUIDs o
CLSIDs para acceder a elementos del panel de control está deprecado, ya que a partir de Windows Vista se pueden utilizar nombres canónicos, lo que hace más legible el código y más facil de recordar.
De esto:
explorer.exe "shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\8\::{17cd9488-1228-4b2f-88ce-4298e93e0966}\pageFileAssoc"
A esto otro:
control.exe /name Microsoft.DefaultPrograms /page pageFileAssoc
Más info al respecto:
- Executing Control Panel Items| MSDN (https://msdn.microsoft.com/en-us/library/windows/desktop/cc144191%28v=vs.85%29.aspx)
La lista completa de nombres canónicos de elementos del panel de control:
- Canonical Names of Control Panel Items | MSDN (https://msdn.microsoft.com/en-us/library/windows/desktop/ee330741%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396)
5.
En lo referente a la programación bajo la plataforma .Net Framework, usar aplicaciones externas supone desventajas en las que no quiero entrar mucho en detalle pero serían una ausencia completa de control de errores (más que el código de salida...y no siempre) y un impacto negativo en el rendimiento de nuestra aplicación (iniciar un proceso y esperar el código de salida, consume muucho tiempo de ejecución en comparación),
por ese motivo podemos y deberíamos evitar el uso de aplicaciones externas y dependientes del sistema como
Explorer,
RunDll32 o
Control ya que en .Net podemos hacer uso directo de la API de Windows implementando la interfáz
IOpenControlPanel para reemplazar la funcionalidad que deseamos de los exe mencionados anteriormente, con las ventajas que eso supone.
Estas serían las definiciones para Visual Basic.Net:
Friend NotInheritable Class NativeMethods
Enum ControlPanelView As Integer
Classic = 0
Category = 1
End Enum
<ComImport()>
<Guid("06622D85-6856-4460-8DE1-A81921B41C4B")>
Class COpenControlPanel
End Class
<ComImport()>
<InterfaceType(ComInterfaceType.InterfaceIsIUnknown)>
<Guid("D11AD862-66DE-4DF4-BF6C-1F5621996AF1")>
Interface IOpenControlPanel
<PreserveSig()>
Function Open(<MarshalAs(UnmanagedType.BStr)> ByVal name As String,
<MarshalAs(UnmanagedType.BStr)> ByVal page As String,
ByVal punkSite As IntPtr
) As Integer
<PreserveSig()>
Function GetPath(<MarshalAs(UnmanagedType.BStr)> ByVal name As String,
<MarshalAs(UnmanagedType.LPWStr)> ByVal path As StringBuilder,
ByVal bufferSize As Integer
) As Integer
<PreserveSig()>
Function GetCurrentView(ByRef refView As ControlPanelView
) As Integer
End Interface
End Class
Ejemplo de uso:
Dim cp As IOpenControlPanel = DirectCast(New COpenControlPanel, IOpenControlPanel)
cp.Open("Microsoft.DefaultPrograms", "pageFileAssoc", Nothing)
Marshal.FinalReleaseComObject(cp)
Más info al respecto:
- IOpenControlPanel interface - MSDN (https://msdn.microsoft.com/en-us/library/windows/desktop/bb775392%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396)
Saludos
Con el uso de la interfáz Win32 que mencioné en el comentario anterior, esto sería una implementación orientada a las páginas del panel de control de Windows 10, utilizando la siguiente enumeración para hacerlo más amistoso en tiempo de diseño:
(yo escogí una Enum, pero podriamos usar un diccionario o lo que más nos guste para darle otro enfoque distinto de usabilidad al código ...claro está)
Public Enum ControlPanelItems As Integer
ActionCenter
ActionCenter_ArchivedMessages
ActionCenter_AutomaticMaintenance
ActionCenter_ProblemReportingSettings
ActionCenter_ProblemReports
ActionCenter_ReliabilityMonitor
AdministrativeTools
AutoPlay
BiometricDevices
BitLockerDriveEncryption
ColorManagement
CredentialManager
CredentialManager_WindowsCredentials
DateAndTime
DateAndTime_Additionalclocks
DefaultPrograms
DefaultPrograms_SetAssociations
DefaultPrograms_SetDefaultPrograms
DeviceManager
DevicesAndPrinters
Display
Display_ScreenResolution
EaseOfAccessCenter
EaseOfAccessCenter_GetRecommendationsToMakeYourComputerEasierToUse_Cognitive
EaseOfAccessCenter_GetRecommendationsToMakeYourComputerEasierToUse_Eyesight
EaseOfAccessCenter_MakeTheComputerEasierToSee
EaseOfAccessCenter_MakeTheKeyboardEasierToUse
EaseOfAccessCenter_MakeTheMouseEasierToUse
EaseOfAccessCenter_SetUpFilterKeys
EaseOfAccessCenter_UseTextOrVisualAlternativesForSounds
EaseOfAccessCenter_UseTheComputerWithoutADisplay
EaseOfAccessCenter_UseTheComputerWithoutAMouseOrKeyboard
FamilySafety
FamilySafety_ChooseAUserAndSetUpFamilySafety
FileHistory
FolderOptions
Fonts
HomeGroup
IndexingOptions
Infrared
InternetOptions
InternetOptions_Advanced
InternetOptions_Connections
InternetOptions_Content
InternetOptions_Privacy
InternetOptions_Programs
InternetOptions_Security
ISCSIInitiator
ISNSServer
Keyboard
Language
LocationSettings
Mouse
Mouse_Hardware
Mouse_PointerOptions
Mouse_Pointers
Mouse_Wheel
MPIOConfiguration
NetworkAndSharingCenter
NetworkAndSharingCenter_AdvancedSharingSettings
NetworkAndSharingCenter_MediaStreamingOptions
NotificationAreaIcons
PenAndTouch
PenAndTouch_Flicks
PenAndTouch_Handwriting
Personalization
Personalization_ColorAndAppearance
Personalization_DesktopBackground
PhoneAndModem
PowerOptions
PowerOptions_EditPlanSettings
PowerOptions_SystemSettings
ProgramsAndFeatures
ProgramsAndFeatures_InstalledUpdates
Recovery
Region
Region_Administrative
Region_Location
RemoteAppAndDesktopConnections
Sound
SpeechRecognition
StorageSpaces
SyncCenter
System
TabletPCSettings
TaskbarAndNavigation
Troubleshooting
Troubleshooting_History
TSAppInstall
UserAccounts
WindowsAnytimeUpgrade
WindowsDefender
WindowsFirewall
WindowsFirewall_AllowedApps
WindowsMobilityCenter
WindowsToGo
WindowsUpdate
WindowsUpdate_ChangeSettings
WindowsUpdate_ViewUpdateHistory
WorkFolders
End Enum
Ahora solo debemos crear un método como este de aquí abajo donde controlar el valor de la enumeración que le pasemos a dicho método:
Public NotInheritable Class ControlPanelUtil
<DebuggerNonUserCode>
Private Sub New()
End Sub
''' <summary>
''' Opens the Control Panel.
''' </summary>
<DebuggerStepThrough>
Public Shared Sub Open()
ControlPanel.OpenControlPanelItem(Nothing, Nothing)
End Sub
''' <summary>
''' Opens a Control Panel Item.
''' </summary>
<DebuggerStepThrough>
Public Shared Sub Open(ByVal item As ControlPanelItems)
Select Case item
Case ControlPanelItems.ActionCenter
ControlPanel.OpenControlPanelItem("Microsoft.ActionCenter", Nothing)
Case ControlPanelItems.ActionCenter_ArchivedMessages
ControlPanel.OpenControlPanelItem("Microsoft.ActionCenter", "pageResponseArchive")
Case ControlPanelItems.ActionCenter_AutomaticMaintenance
ControlPanel.OpenControlPanelItem("Microsoft.ActionCenter", "MaintenanceSettings")
Case ControlPanelItems.ActionCenter_ProblemReportingSettings
ControlPanel.OpenControlPanelItem("Microsoft.ActionCenter", "pageSettings")
Case ControlPanelItems.ActionCenter_ProblemReports
ControlPanel.OpenControlPanelItem("Microsoft.ActionCenter", "pageProblems")
Case ControlPanelItems.ActionCenter_ReliabilityMonitor
ControlPanel.OpenControlPanelItem("Microsoft.ActionCenter", "pageReliabilityView")
Case ControlPanelItems.AdministrativeTools
ControlPanel.OpenControlPanelItem("Microsoft.AdministrativeTools", Nothing)
Case ControlPanelItems.AutoPlay
ControlPanel.OpenControlPanelItem("Microsoft.AutoPlay", Nothing)
Case ControlPanelItems.BiometricDevices
ControlPanel.OpenControlPanelItem("Microsoft.BiometricDevices", Nothing)
Case ControlPanelItems.BitLockerDriveEncryption
ControlPanel.OpenControlPanelItem("Microsoft.BitLockerDriveEncryption", Nothing)
Case ControlPanelItems.ColorManagement
ControlPanel.OpenControlPanelItem("Microsoft.ColorManagement", Nothing)
Case ControlPanelItems.CredentialManager
ControlPanel.OpenControlPanelItem("Microsoft.CredentialManager", Nothing)
Case ControlPanelItems.CredentialManager_WindowsCredentials
ControlPanel.OpenControlPanelItem("Microsoft.CredentialManager", "?SelectedVault=CredmanVault")
Case ControlPanelItems.DateAndTime
ControlPanel.OpenControlPanelItem("Microsoft.DateAndTime", Nothing)
Case ControlPanelItems.DateAndTime_Additionalclocks
ControlPanel.OpenControlPanelItem("Microsoft.DateAndTime", "1")
Case ControlPanelItems.DefaultPrograms
ControlPanel.OpenControlPanelItem("Microsoft.DefaultPrograms", Nothing)
Case ControlPanelItems.DefaultPrograms_SetAssociations
ControlPanel.OpenControlPanelItem("Microsoft.DefaultPrograms", "pageFileAssoc")
Case ControlPanelItems.DefaultPrograms_SetDefaultPrograms
ControlPanel.OpenControlPanelItem("Microsoft.DefaultPrograms", "pageDefaultProgram")
Case ControlPanelItems.DeviceManager
ControlPanel.OpenControlPanelItem("Microsoft.DeviceManager", Nothing)
Case ControlPanelItems.DevicesAndPrinters
ControlPanel.OpenControlPanelItem("Microsoft.DevicesAndPrinters", Nothing)
Case ControlPanelItems.Display
ControlPanel.OpenControlPanelItem("Microsoft.Display", Nothing)
Case ControlPanelItems.Display_ScreenResolution
ControlPanel.OpenControlPanelItem("Microsoft.Display", "Settings")
Case ControlPanelItems.EaseOfAccessCenter
ControlPanel.OpenControlPanelItem("Microsoft.EaseOfAccessCenter", Nothing)
Case ControlPanelItems.EaseOfAccessCenter_GetRecommendationsToMakeYourComputerEasierToUse_Cognitive
ControlPanel.OpenControlPanelItem("Microsoft.EaseOfAccessCenter", "pageQuestionsCognitive")
Case ControlPanelItems.EaseOfAccessCenter_GetRecommendationsToMakeYourComputerEasierToUse_Eyesight
ControlPanel.OpenControlPanelItem("Microsoft.EaseOfAccessCenter", "pageQuestionsEyesight")
Case ControlPanelItems.EaseOfAccessCenter_MakeTheComputerEasierToSee
ControlPanel.OpenControlPanelItem("Microsoft.EaseOfAccessCenter", "pageEasierToSee")
Case ControlPanelItems.EaseOfAccessCenter_MakeTheKeyboardEasierToUse
ControlPanel.OpenControlPanelItem("Microsoft.EaseOfAccessCenter", "pageKeyboardEasierToUse")
Case ControlPanelItems.EaseOfAccessCenter_MakeTheMouseEasierToUse
ControlPanel.OpenControlPanelItem("Microsoft.EaseOfAccessCenter", "pageEasierToClick")
Case ControlPanelItems.EaseOfAccessCenter_SetUpFilterKeys
ControlPanel.OpenControlPanelItem("Microsoft.EaseOfAccessCenter", "pageFilterKeysSettings")
Case ControlPanelItems.EaseOfAccessCenter_UseTextOrVisualAlternativesForSounds
ControlPanel.OpenControlPanelItem("Microsoft.EaseOfAccessCenter", "pageEasierWithSounds")
Case ControlPanelItems.EaseOfAccessCenter_UseTheComputerWithoutADisplay
ControlPanel.OpenControlPanelItem("Microsoft.EaseOfAccessCenter", "pageNoVisual")
Case ControlPanelItems.EaseOfAccessCenter_UseTheComputerWithoutAMouseOrKeyboard
ControlPanel.OpenControlPanelItem("Microsoft.EaseOfAccessCenter", "pageNoMouseOrKeyboard")
Case ControlPanelItems.FamilySafety
ControlPanel.OpenControlPanelItem("Microsoft.ParentalControls", Nothing)
Case ControlPanelItems.FamilySafety_ChooseAUserAndSetUpFamilySafety
ControlPanel.OpenControlPanelItem("Microsoft.ParentalControls", "pageUserHub")
Case ControlPanelItems.FileHistory
ControlPanel.OpenControlPanelItem("Microsoft.FileHistory", Nothing)
Case ControlPanelItems.FolderOptions
ControlPanel.OpenControlPanelItem("Microsoft.FolderOptions", Nothing)
Case ControlPanelItems.Fonts
ControlPanel.OpenControlPanelItem("Microsoft.Fonts", Nothing)
Case ControlPanelItems.HomeGroup
ControlPanel.OpenControlPanelItem("Microsoft.HomeGroup", Nothing)
Case ControlPanelItems.IndexingOptions
ControlPanel.OpenControlPanelItem("Microsoft.IndexingOptions", Nothing)
Case ControlPanelItems.Infrared
ControlPanel.OpenControlPanelItem("Microsoft.Infrared", Nothing)
Case ControlPanelItems.InternetOptions
ControlPanel.OpenControlPanelItem("Microsoft.InternetOptions", Nothing)
Case ControlPanelItems.InternetOptions_Advanced
ControlPanel.OpenControlPanelItem("Microsoft.InternetOptions", "6")
Case ControlPanelItems.InternetOptions_Connections
ControlPanel.OpenControlPanelItem("Microsoft.InternetOptions", "4")
Case ControlPanelItems.InternetOptions_Content
ControlPanel.OpenControlPanelItem("Microsoft.InternetOptions", "3")
Case ControlPanelItems.InternetOptions_Privacy
ControlPanel.OpenControlPanelItem("Microsoft.InternetOptions", "2")
Case ControlPanelItems.InternetOptions_Programs
ControlPanel.OpenControlPanelItem("Microsoft.InternetOptions", "5")
Case ControlPanelItems.InternetOptions_Security
ControlPanel.OpenControlPanelItem("Microsoft.InternetOptions", "1")
Case ControlPanelItems.ISCSIInitiator
ControlPanel.OpenControlPanelItem("Microsoft.iSCSIInitiator", Nothing)
Case ControlPanelItems.ISNSServer
ControlPanel.OpenControlPanelItem("Microsoft.iSNSServer", Nothing)
Case ControlPanelItems.Keyboard
ControlPanel.OpenControlPanelItem("Microsoft.Keyboard", Nothing)
Case ControlPanelItems.Language
ControlPanel.OpenControlPanelItem("Microsoft.Language", Nothing)
Case ControlPanelItems.LocationSettings
ControlPanel.OpenControlPanelItem("Microsoft.LocationSettings", Nothing)
Case ControlPanelItems.Mouse
ControlPanel.OpenControlPanelItem("Microsoft.Mouse", Nothing)
Case ControlPanelItems.Mouse_Hardware
ControlPanel.OpenControlPanelItem("Microsoft.Mouse", "4")
Case ControlPanelItems.Mouse_PointerOptions
ControlPanel.OpenControlPanelItem("Microsoft.Mouse", "2")
Case ControlPanelItems.Mouse_Pointers
ControlPanel.OpenControlPanelItem("Microsoft.Mouse", "1")
Case ControlPanelItems.Mouse_Wheel
ControlPanel.OpenControlPanelItem("Microsoft.Mouse", "3")
Case ControlPanelItems.MPIOConfiguration
ControlPanel.OpenControlPanelItem("Microsoft.MPIOConfiguration", Nothing)
Case ControlPanelItems.NetworkAndSharingCenter
ControlPanel.OpenControlPanelItem("Microsoft.NetworkAndSharingCenter", Nothing)
Case ControlPanelItems.NetworkAndSharingCenter_AdvancedSharingSettings
ControlPanel.OpenControlPanelItem("Microsoft.NetworkAndSharingCenter", "Advanced")
Case ControlPanelItems.NetworkAndSharingCenter_MediaStreamingOptions
ControlPanel.OpenControlPanelItem("Microsoft.NetworkAndSharingCenter", "ShareMedia")
Case ControlPanelItems.NotificationAreaIcons
ControlPanel.OpenControlPanelItem("Microsoft.NotificationAreaIcons", Nothing)
Case ControlPanelItems.PenAndTouch
ControlPanel.OpenControlPanelItem("Microsoft.PenAndTouch", Nothing)
Case ControlPanelItems.PenAndTouch_Flicks
ControlPanel.OpenControlPanelItem("Microsoft.PenAndTouch", "1")
Case ControlPanelItems.PenAndTouch_Handwriting
ControlPanel.OpenControlPanelItem("Microsoft.PenAndTouch", "2")
Case ControlPanelItems.Personalization
ControlPanel.OpenControlPanelItem("Microsoft.Personalization", Nothing)
Case ControlPanelItems.Personalization_ColorAndAppearance
ControlPanel.OpenControlPanelItem("Microsoft.Personalization", "pageColorization")
Case ControlPanelItems.Personalization_DesktopBackground
ControlPanel.OpenControlPanelItem("Microsoft.Personalization", "pageWallpaper")
Case ControlPanelItems.PhoneAndModem
ControlPanel.OpenControlPanelItem("Microsoft.PhoneAndModem", Nothing)
Case ControlPanelItems.PowerOptions
ControlPanel.OpenControlPanelItem("Microsoft.PowerOptions", Nothing)
Case ControlPanelItems.PowerOptions_EditPlanSettings
ControlPanel.OpenControlPanelItem("Microsoft.PowerOptions", "pagePlanSettings")
Case ControlPanelItems.PowerOptions_SystemSettings
ControlPanel.OpenControlPanelItem("Microsoft.PowerOptions", "pageGlobalSettings")
Case ControlPanelItems.ProgramsAndFeatures
ControlPanel.OpenControlPanelItem("Microsoft.ProgramsAndFeatures", Nothing)
Case ControlPanelItems.ProgramsAndFeatures_InstalledUpdates
ControlPanel.OpenControlPanelItem("Microsoft.ProgramsAndFeatures", "::{D450A8A1-9568-45C7-9C0E-B4F9FB4537BD}")
Case ControlPanelItems.Recovery
ControlPanel.OpenControlPanelItem("Microsoft.Recovery", Nothing)
Case ControlPanelItems.Region
ControlPanel.OpenControlPanelItem("Microsoft.RegionAndLanguage", Nothing)
Case ControlPanelItems.Region_Administrative
ControlPanel.OpenControlPanelItem("Microsoft.RegionAndLanguage", "2")
Case ControlPanelItems.Region_Location
ControlPanel.OpenControlPanelItem("Microsoft.RegionAndLanguage", "1")
Case ControlPanelItems.RemoteAppAndDesktopConnections
ControlPanel.OpenControlPanelItem("Microsoft.RemoteAppAndDesktopConnections", Nothing)
Case ControlPanelItems.Sound
ControlPanel.OpenControlPanelItem("Microsoft.Sound", Nothing)
Case ControlPanelItems.SpeechRecognition
ControlPanel.OpenControlPanelItem("Microsoft.SpeechRecognition", Nothing)
Case ControlPanelItems.StorageSpaces
ControlPanel.OpenControlPanelItem("Microsoft.StorageSpaces", Nothing)
Case ControlPanelItems.SyncCenter
ControlPanel.OpenControlPanelItem("Microsoft.SyncCenter", Nothing)
Case ControlPanelItems.System
ControlPanel.OpenControlPanelItem("Microsoft.System", Nothing)
Case ControlPanelItems.TabletPCSettings
ControlPanel.OpenControlPanelItem("Microsoft.TabletPCSettings", Nothing)
Case ControlPanelItems.TaskbarAndNavigation
ControlPanel.OpenControlPanelItem("Microsoft.Taskbar", Nothing)
Case ControlPanelItems.Troubleshooting
ControlPanel.OpenControlPanelItem("Microsoft.Troubleshooting", Nothing)
Case ControlPanelItems.Troubleshooting_History
ControlPanel.OpenControlPanelItem("Microsoft.Troubleshooting", "HistoryPage")
Case ControlPanelItems.TSAppInstall
ControlPanel.OpenControlPanelItem("Microsoft.TSAppInstall", Nothing)
Case ControlPanelItems.UserAccounts
ControlPanel.OpenControlPanelItem("Microsoft.UserAccounts", Nothing)
Case ControlPanelItems.WindowsAnytimeUpgrade
ControlPanel.OpenControlPanelItem("Microsoft.WindowsAnytimeUpgrade", Nothing)
Case ControlPanelItems.WindowsDefender
ControlPanel.OpenControlPanelItem("Microsoft.WindowsDefender", Nothing)
Case ControlPanelItems.WindowsFirewall
ControlPanel.OpenControlPanelItem("Microsoft.WindowsFirewall", Nothing)
Case ControlPanelItems.WindowsFirewall_AllowedApps
ControlPanel.OpenControlPanelItem("Microsoft.WindowsFirewall", "pageConfigureApps")
Case ControlPanelItems.WindowsMobilityCenter
ControlPanel.OpenControlPanelItem("Microsoft.MobilityCenter", Nothing)
Case ControlPanelItems.WindowsToGo
ControlPanel.OpenControlPanelItem("Microsoft.PortableWorkspaceCreator", Nothing)
Case ControlPanelItems.WindowsUpdate
ControlPanel.OpenControlPanelItem("Microsoft.WindowsUpdate", Nothing)
Case ControlPanelItems.WindowsUpdate_ChangeSettings
ControlPanel.OpenControlPanelItem("Microsoft.WindowsUpdate", "pageSettings")
Case ControlPanelItems.WindowsUpdate_ViewUpdateHistory
ControlPanel.OpenControlPanelItem("Microsoft.WindowsUpdate", "pageUpdateHistory")
Case ControlPanelItems.WorkFolders
ControlPanel.OpenControlPanelItem("Microsoft.WorkFolders", Nothing)
Case Else
Throw New InvalidEnumArgumentException(argumentName:="item",
invalidValue:=item,
enumClass:=GetType(ControlPanelItems))
End Select
End Sub
<DebuggerStepThrough>
Private Shared Sub OpenControlPanelItem(ByVal name As String,
ByVal page As String)
Dim cp As IOpenControlPanel = DirectCast(New OpenControlPanel, IOpenControlPanel)
cp.Open(name, page, Nothing)
Marshal.FinalReleaseComObject(cp)
End Sub
End Class
Actualmente todo esto y mucho más forma parte de mi API gratuita conocida como ElektroKit, que pueden encontrar en GitHub por ese mismo nombre.
Créditos: Elektro (y MSDN :P).
Saludos
Gracias
Elektro por ampliar el tema. ;-)
Ayer me instalé Windows 7 en el PC ( en el portátil tengo Vista), y comprobé el archivo
Shell32.dll, y como dices después de Vista, ya no se encuentra las llamadas... :
shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\8\::{15EAE92E-F17A-4431-9F28-805E482dAFD4}
... en Shell32.dll
pero siguen funcionando y se pueden usar tranquilamente en Windows 7 sin problemas. A no ser que se haga una llamada a algo que simplemente ya no exista o se deba hacer de otra manera.
Aunque alguna queda, por ejemplo, se puede encontrar esta parte del recurso XML en Shell32.dll de W7 que corresponde a 'Panel de control\Programas\Obtener programas':
....
<sh:name>@shell32.dll,-24109</sh:name>
<sh:keywords>@shell32.dll,-25334</sh:keywords>
<sh:keywords>@shell32.dll,-25207</sh:keywords>
<sh:keywords>@shell32.dll,-25077</sh:keywords>
<sh:command>esh:command>
<sh:condition name="shcond://v1#IsMachineOnDomain"/>
</sh:conditions>
....
Ahora la mayoría es como esto:
....
<sh:name>@shell32.dll,-24078</sh:name>
<sh:keywords>@shell32.dll,-25068</sh:keywords>
<sh:keywords>@shell32.dll,-25067</sh:keywords>
<sh:keywords>@shell32.dll,-25092</sh:keywords>
<sh:keywords>@shell32.dll,-25069</sh:keywords>
<sh2:controlpanel page="pageEasierToSee" name="Microsoft.EaseOfAccessCenter"/>
...
Me has ahorrado también listar todas las entradas y el código para usar en NET. ;-)
Aunque si te digo la verdad no me lo esperaba, ya tenía escrito y me encuentro que ya lo habías puesto tú e incluso mejor.
Permíteme ahora, algunas consideraciones, que creo no están fuera de lugar.
Cita de: Eleкtro en 9 Mayo 2016, 18:21 PM
En realidad el uso de GUIDs o CLSIDs para acceder a elementos del panel de control está deprecado, ya que a partir de Windows Vista se pueden utilizar nombres canónicos, lo que hace más legible el código y más fácil de recordar.
Desde mi punto de vista en informática no existe nada "deprecado" (luego explico porqué lo pongo entre comillas). Es como decir que las máquinas de escribir ya no se usan. Todavía hay gente que las usa. Al final todo depende de gustos y necesidades, y no del hecho que haya surgido algo más nuevo dentro del cual lo de antes ya no se use. Yo no voy a tirar ni dejar de usar mi vieja máquina de escribir porque ya no se use o porque ahora tenga un ordenador. Puede que en algún momento la necesite y me venga la mar de bien.
Si nunca hubiera existido Windows XP y surgiera ahora ¿Podría considerarse obsoleto algo de Vista o W7, W8, etc, porque no funcione o no se use en XP? Además, si algo sigue pudiéndose usar, ya sea dentro de lo nuevo o lo viejo o ambos, no puede considerarse obsoleto. Si por ejemplo, Microsoft incluye y permite usar funciones VB, quien las quiera usar que las use, tampoco va a explotar el ordenador y para alguna chapucilla para qué complicarse.
Permíteme un pequeño apunte y que valga para los demás. Creo que abusas de la palabra "deprecado" ya que te lo he visto usar muchas veces. No estoy seguro que signifique lo que imaginas, ¿anticuado, desusado, viejo, arcaico, antiguo, desfasado, caduco, obsoleto?
En inglés,
deprecated significa
obsoleto o censurado, pero en castellano he buscado y significa algo muy distinto como
rogar o suplicar. No he encontrado ninguna acepción similar a 'obsoleto', en lengua castellana, que supongo es la que quieres usar en realidad o similar. Como no sea en algún país latino.
deprecar. (Del lat. deprecāri, rogar). tr. Rogar, pedir, suplicar con eficacia o instancia.
Cita de: Eleкtro en 9 Mayo 2016, 18:21 PM
y un impacto negativo en el rendimiento de nuestra aplicación (iniciar un proceso y esperar el código de salida, consume mucho tiempo de ejecución en comparación)
¿Qué computadora usas tú? Tanto como 'muucho tiempo'
es exagerar. Yo no uso digamos una super computadora de la NASA, me considero una persona impaciente y a mí se me carga al instante aunque use Explorer.exe o Rundll32. En fin.
Espero no te tomes estos comentarios como una reprimenda después de todo, tu también a veces lo haces XD
S2s
Cita de: Lekim en 11 Mayo 2016, 18:11 PMDesde mi punto de vista en informática no existe nada "deprecado"
Eso es muy discutible, aunque cada persona puede interpretarlo como prefiera, pero lo que podemos ver es que en la vida, en la tecnología, y más concretamente en la informática, la utilización de lo deprecado tiende a traer consecuencias negativas (aparte de no estar aprovechando lo moderno/completo), como por ejemplo la ausencia de soporte y compatibilidad de lo que está deprecado, o que desaparezca por completo, cosa que también ocurre en la programación (si, las funciones deprecadas tienden a ser eliminadas con el paso de los años).
Sin ir más lejos te daré unos ejemplos que conoces de sobra:
- Sistemas operativos como Windows XP y anteriores.
- IDEs como Visual Studio 2010 y etc (que no soportan los nuevos runtimes de .Net Framework).
- Visual Basic 5, 6, y etc.
- La tecnología Windows Forms.
- Los primeros runtimes de .NET Framework.
En lo que respecta al uso de funciones deprecadas en la API de Windows, cuando se le asigna el estado "deprecado", éstas tienden a desaparecer por completo con el tiempo como ya he mencionado, aunque comúnmente pasan a ser completamente reemplazadas por otras funciones más modernas, más completas, y en constante refactorización, mientras que esa función deprecada sigue permaneciendo ahí simplemente por compatibilidad y sin aportar ninguna mejora/refactorización en su código en el futuro, como por ejemplo la función
WinExec. Como ya te digo, no es que yo me lo invente, también puedes leer lo que acabo de explicar, en la Wikipedia:
- https://en.wikipedia.org/wiki/Windows_API
En resumen, lo obsolescente está condenado a la extinción por que la obsolescencia implica un olvido con el paso del tiempo, al menos así lo veo yo.
Cita de: Lekim en 11 Mayo 2016, 18:11 PMCreo que abusas de la palabra "deprecado" ya que te lo he visto usar muchas veces.
Te equivocas, no creo que se pueda considerar abuso cuando la información que se da es la correcta para abrir camino hacia el uso de metodologías modernas.
Cuando me hayas visto decir que una función u otro tipo de miembro y/o conjunto o metodología está deprecada, jamás ni una sola vez lo he dicho como una simple opinión personal mia, sino como una información que está expuesta en los artículos de MSDN (o por desarrolladores de Microsoft en otros artículos, etc, vamos, cosas oficiales), no es que yo lo diga por que me de la gana, solamente transmito lo que afirma Microsoft con ese mismo termino "
deprecated" ...seguido de un vínculo que redirige a una función y/o metodología mejorada, como suele ser, y como es el caso.
CitarNo estoy seguro que signifique lo que imaginas, ¿anticuado, desusado, viejo, arcaico, antiguo, desfasado, caduco, obsoleto?
En inglés, deprecated significa obsoleto o censurado, pero en castellano he buscado y significa algo muy distinto como rogar o suplicar.
Vaya, ahí si que te tengo que dar toda la razón del mundo, he estado utilizando mal esa palabra todo este tiempo.
No me gusta decir que algo es obsoleto, no me gusta lo despectiva que suena esa palabra y por eso empecé a usar la palabra "deprecado" (dándole un significado incorrecto como has explicado) como sinónimo de anticuado, desfasado o ...si, obsoleto.
CitarCita de: Eleкtro en 9 Mayo 2016, 18:21 PMy un impacto negativo en el rendimiento de nuestra aplicación (iniciar un proceso y esperar el código de salida, consume mucho tiempo de ejecución en comparación)
Citar¿Qué computadora usas tú? Tanto como 'muucho tiempo' es exagerar. Yo no uso digamos una super computadora de la NASA, me considero una persona impaciente y a mí se me carga al instante aunque use Explorer.exe o Rundll32. En fin.
Que tu tengas la sensación de que se "cargue" al instante no significa que no exista una diferencia de velocidad por los procedimientos necesarios que supone crear un proceso y destuirlo. También se debe leer entre lineas cuando he dicho "es mucho
EN COMPARACIÓN", eso en la mayoría de casos significa muy pocos millisegundos, no más, pero eso se puede considerar como una diferencia muy excesiva cuando se busca la perfección o eficiencia máxima posible de un algoritmo, por que esas pequeñas cosas (como por ejemplo búcles repetitivos que inicien executables para esperar un código de salida) son lo que al final lo acaban haciendo expensivo.
CitarEspero no te tomes estos comentarios como una reprimenda después de todo, tu también a veces lo haces XD
Si yo no estuviese abierto a las críticas negativas entonces no me consideraría moderador, y es cierto que yo a veces intento corregir a quien me parece o a quien estoy seguro de que se equivoca pero más que por corregirle es por enseñarle a esa persona, en cambio, me parece que tu en más de un comentario de este post has utilizado un sarcasmo extremo que no viene a cuento ...debido a ideas equívocas;
si no estás seguro de la veracidad de algo de lo que yo te diga, pues tal vez lo correcto sería preguntarme por que motivos afirmo esas cosas en vez de intentar corregir, o informarte por ti mismo para poder tener argumentos con los que debatirlo, y entonces yo aceptaría una posible corrección si hubiese que aceptarla.
Saludos!