Page 1 of 1
Question about unattended or silent uninstallation
Posted: 11 Nov 2024 03:00
by MauricioDeAbreu
Buenas días amigos.
Tengo una duda con respecto a la desinstalación de un programa desde un archivo Batch
La única forma en que puedo ejecutar la desinstalación del programa es mediante esta linea que extraje del UninstallString del editor de registro.
rundll32.exe dfshim.dll,ShArpMaintain ComponentesHarware.application, Culture=neutral, PublicKeyToken=b3fd472d4be1fc0f, processorArchitecture=msil
Pero no encuentro una manera de hacer que la desinstalación sea sin intervención del usuario, ya que al ejecutar la linea muestra la ventana de desinstalación pero pide la confirmación (aceptar).
Use el parámetro /S pero me da error, diciendo que el programa no se ha podido desinstalar.
Hay alguna forma de lograr que se realice la desinstalación sin que pida darle a aceptar ?
De antemano muchísimas gracias por el apoyo.
Re: Duda con desinstalación desatendida o silenciosa
Posted: 11 Nov 2024 09:48
by Squashman
We do ask that all posts are in English on the forum. If you need language specific support I would suggest you post on StackOverFlow which has dedicated sites for several languages.
Re: Duda con desinstalación desatendida o silenciosa
Posted: 11 Nov 2024 10:35
by MauricioDeAbreu
Sorry, the browser translates automatically, so I thought I was in Spanish.
Good morning friends
I have a question regarding the uninstallation of a program from a Batch file
The only way I can execute the uninstallation of the program is through this line that extrajects from the uninstallstring of the registration editor.
rundll32.exe dfshim.dll,ShArpMaintain ComponentesHarware.application, Culture=neutral, PublicKeyToken=b3fd472d4be1fc0f, processorArchitecture=msil
But I can not find a way to make the uninstallation it is without user intervention, since when executing the line it shows the uninstall window but asks for confirmation.
Use the / s parameter but it gives me error, saying that the program has not been uninstalled.
Is there any way to get the uninstallation without asking to accept?
Thank you very much for the support.
Re: Duda con desinstalación desatendida o silenciosa
Posted: 11 Nov 2024 11:28
by Aacini
You have not indicated the way to provide the confirmation... If it is just the Enter key, try:
Code: Select all
echo/| rundll32.exe dfshim.dll,ShArpMaintain ComponentesHarware.application, Culture=neutral, PublicKeyToken=b3fd472d4be1fc0f, processorArchitecture=msil
If it is a "S" key, try:
Code: Select all
echo S| rundll32.exe dfshim.dll,ShArpMaintain ComponentesHarware.application, Culture=neutral, PublicKeyToken=b3fd472d4be1fc0f, processorArchitecture=msil
If this don't works there are still other options...
Antonio
Re: Duda con desinstalación desatendida o silenciosa
Posted: 11 Nov 2024 12:47
by MauricioDeAbreu
Thanks for replying.
It is accepted with the ENTER key.
and no, unfortunately it didn't work...
Thank you in advance for any other suggestion.
Re: Question about unattended or silent uninstallation
Posted: 13 Nov 2024 04:11
by Aacini
Try this:
Code: Select all
@if (@CodeSection == @Batch) @then
@echo off
rem Use %SendKeys% to send keys to the keyboard buffer
set SendKeys=CScript //nologo //E:JScript "%~F0"
rem Start the other program in the same Window
start "" /B rundll32.exe dfshim.dll,ShArpMaintain ComponentesHarware.application, Culture=neutral, PublicKeyToken=b3fd472d4be1fc0f, processorArchitecture=msil
rem Enable next line if there are synchro problems
REM ping -n 4 localhost > NUL
rem Send the ENTER key
%SendKeys% "{ENTER}"
goto :EOF
@end
// JScript section
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.SendKeys(WScript.Arguments(0));
Further details at
this answer